pkpio / fitbit-googlefit

Export Fitbit data to Google Fit. Unlike the alternatives such as fitnessyncer.com, this offers very fine intraday granularity (every minute/second data).
http://pkp.io/blog/fitbit-to-googlefit-sync/
GNU General Public License v3.0
491 stars 61 forks source link

Upgrade sleep to use Fitbit v1.2 API #78

Closed dwoffinden closed 3 years ago

dwoffinden commented 3 years ago

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: https://github.com/orcasgit/python-fitbit/issues/128

TODO: switch to the new GFit sleep segment API: https://developers.google.com/android/reference/com/google/android/gms/fitness/data/SleepStages

pkpio commented 3 years ago

Feel free to open an issue for the TODO. I will go ahead and merge these changes.

dwoffinden commented 3 years ago

Thanks! I'll try to dig into some official documentation on the newer API, for now this seems to work well :)

nattofriends commented 3 years ago

I implemented the sleep segment API support on top of Woyken's fork recently, it wasn't too hard (although I would much prefer to use this repo as is). The REST side documentation for the sleep segment changes are at https://developers.google.com/fit/improvements and https://developers.google.com/fit/datatypes/sleep.

pkpio commented 3 years ago

I implemented the sleep segment API support on top of Woyken's fork recently, it wasn't too hard (although I would much prefer to use this repo as is). The REST side documentation for the sleep segment changes are at https://developers.google.com/fit/improvements and https://developers.google.com/fit/datatypes/sleep.

Happy to review and work to get your changes merged if you could open a PR? Thank you 😁