You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... I see the endpoint seems to be updated to be like https://api.fitbit.com/1.2/user/-/sleep/. (Note the "1.2".)
I was looking into this because I'd like to be collecting the sleep stages data (minute-by-minute information about which "stage" of sleep is occurring), which appears to be available in this new endpoint. (I think the old one is working but deprecated: https://dev.fitbit.com/build/reference/web-api/sleep-v1/ )
The text was updated successfully, but these errors were encountered:
There's a temptation to clean up with versioned files and stuff but here’s an approach I think might be lossless and a lot easier.
Add a new JSON key to fitbit_urls that stores all the relevant data from the new endpoint
Fill it in with data into the past.
Leave the old ones in place, and let them keep updating if they can. (Don’t care if it’s redundant.)
I think this is “good enough” as I expect it’s lossless, gets the new data, and allows (further) cleanup at some later date (which I don’t expect to happen, but at least it hasn’t been rendered impossible). It should be backwards compatible as long as something using the data isn't upset by the appearance of a new key (which seems very unlikely).
Looking at this:
https://github.com/OpenHumans/oh-fitbit-integration/blob/master/datauploader/tasks.py
... it seems that the endpoint is going to
https://api.fitbit.com/1/user
That prefix is still used for the following:
https://api.fitbit.com/1/user/[user-id]/activities/tracker/...
https://api.fitbit.com/1/user/[user-id]/activities/heart/...
https://api.fitbit.com/1/user/[user-id]/activities/body/...
However from the sleep documentation: https://dev.fitbit.com/build/reference/web-api/sleep/
... I see the endpoint seems to be updated to be like
https://api.fitbit.com/1.2/user/-/sleep/
. (Note the "1.2".)I was looking into this because I'd like to be collecting the sleep stages data (minute-by-minute information about which "stage" of sleep is occurring), which appears to be available in this new endpoint. (I think the old one is working but deprecated: https://dev.fitbit.com/build/reference/web-api/sleep-v1/ )
The text was updated successfully, but these errors were encountered: