forked from pkpio/fitbit-googlefit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade sleep to use Fitbit v1.2 API
- Fix pre-midnight sleeps being shifted forwards a day, in the new API the point includes the full date and time, avoiding the confusion. - Fix stages being uncategoried, the old code checked for 1/2/3 as ints when they were actually strings, the new API includes more types, and uses strings. - I think the new API is also more granular (down to 30s) but less dense (it returns one point per stage, and tells you how long it lasted). Old: https://dev.fitbit.com/build/reference/web-api/sleep-v1 New: https://dev.fitbit.com/build/reference/web-api/sleep Workaround to enable it: orcasgit/python-fitbit#128 TODO: switch to the new GFit sleep segment API: https://developers.google.com/android/reference/com/google/android/gms/fitness/data/SleepStages
- Loading branch information
1 parent
2bce68a
commit fbfe209
Showing
3 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters