Repository navigation
intraday_time_series returns no heart rate #126
Copy link
Copy link
Open
Description
I am doing essentially this:
pp = pprint.PrettyPrinter(indent=4)
authd_client = fitbit.Fitbit(‘XXX’,
‘XXXX’,
access_token=‘XXXX’,
refresh_token=‘XXXXX’)
authd_client.sleep()
res = authd_client.intraday_time_series("activities/heart", base_date='yesterday', detail_level='1sec')
pp.pprint(res)
I don't get any errors, but the result seems to contain only some public activities, no private heartrate data. I did request access to intraday data via fitbit, but to be fair I have received no reply whatsoever. I'm using python 3.5.3 if that matters. Any ideas?
Top of the returned result:
{ 'categories': [ { 'activities': [ { 'accessLevel': 'PUBLIC',
'activityLevels': [ { 'id': 3016,
'maxSpeedMPH': -1,
'mets': 8.5,
'minSpeedMPH': -1,
'name': '6 '
'- '
'8 '
'inch '
'step'},
{ 'id': 3017,
'maxSpeedMPH': -1,
'mets': 10,
'minSpeedMPH': -1,
'name': '10 '
'- '
'12 '
'inch '
'step'}],
'hasSpeed': False,
'id': 90004,
'name': 'Aerobic step'},
{ 'accessLevel': 'PUBLIC',
'hasSpeed': False,
'id': 3015,
'mets': 6.5,
'name': 'Aerobic, general'},
{ 'accessLevel': 'PUBLIC',
'activityLevels': [ { 'id': 3020,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
zelenij commentedon Feb 4, 2018
Bummer, I think it's "yesterday" in my query. Changed to "today" and seems to be working. Oh well, sorry for making fuss :)
Maybe the library should be able to detect invalid date as an error? Or is it assumed to be the responsibility of the fitbit API?