Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intraday_time_series returns no heart rate #126

Open
zelenij opened this issue Feb 4, 2018 · 1 comment
Open

intraday_time_series returns no heart rate #126

zelenij opened this issue Feb 4, 2018 · 1 comment

Comments

@zelenij
Copy link

zelenij commented Feb 4, 2018

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,
@zelenij
Copy link
Author

zelenij commented 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant