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
If you pass period='max' to Fitbit.get_bodyweight it fails:
File "/home/jlapenna/code/bikebuds/gae/api/shared/services/withings/bbfitbit.py", line 30, in sync
measures = client.get_bodyweight(period='1y')
File "/home/jlapenna/code/bikebuds/gae/api/lib/fitbit/api.py", line 845, in get_bodyweight
return self._get_body('weight', base_date, user_id, period, end_date)
File "/home/jlapenna/code/bikebuds/gae/api/lib/fitbit/api.py", line 882, in _get_body
return self.make_request(url)
File "/home/jlapenna/code/bikebuds/gae/api/lib/fitbit/api.py", line 223, in make_request
response = self.client.make_request(*args, **kwargs)
File "/home/jlapenna/code/bikebuds/gae/api/lib/fitbit/api.py", line 99, in make_request
exceptions.detect_and_raise_error(response)
File "/home/jlapenna/code/bikebuds/gae/api/lib/fitbit/exceptions.py", line 96, in detect_and_raise_error
raise HTTPBadRequest(response)
HTTPBadRequest: Invalid period: max
If you pass period='max' to Fitbit.get_bodyweight it fails:
This is due to using the https://dev.fitbit.com/build/reference/web-api/body/#get-weight-logs API.
If it used https://dev.fitbit.com/build/reference/web-api/body/#get-body-time-series then you could fetch longer, but the data returned is different, too (this is a supported, different API call,
time_series()
).This bug will be to change the accepted period parameters for get_bodyweight and get_bodyfat.
The text was updated successfully, but these errors were encountered: