-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Authentication by handing it over to garth #114
base: master
Are you sure you want to change the base?
Conversation
Replaces the login dance and api calls, and fixes the broken login. Tokens are long-lived and can be stored, thus username and password are optional. The token store is currently hardcoded and insecure.
Thanks for showing an interest in the tool. I already turned down a PR to integrate with garth, and I still feel the same way about using a library that downloads credentials (whose?) from some S3 bucket. (see #104 (comment) for more details). I might reconsider but I would prefer another way, if possible. |
@@ -268,8 +148,8 @@ def _fetch_activity_ids_and_ts(self, start_index, max_limit=100): | |||
:rtype: tuples of (int, datetime) | |||
""" | |||
log.debug("fetching activities %d through %d ...", start_index, start_index + max_limit - 1) | |||
response = self.session.get( | |||
"https://connect.garmin.com/activitylist-service/activities/search/activities", | |||
response = self.gc.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flyingflo you can also use self.gc.connectapi()
response = self.session.get( | ||
"https://connect.garmin.com/activitylist-service/activities/search/activities", | ||
response = self.gc.get( | ||
"connectapi", "/activitylist-service/activities/search/activities", api=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some time between November 1 and today, this API call is now returning an empty list instead of my activity IDs (so I falsely have zero activities instead of almost a thousand)
For #113
Use garth for auth and api
Replaces the login dance and api calls,
and fixes the broken login.
Tokens are long-lived and can be stored,
thus username and password are optional.
TODO: