Skip to content

unable to get sleep summary data using time_series('sleep')  #147

Open

Description

@t0560r91

When I make a API request using

auth_client.time_series('sleep', base_date=start_date, end_date=end_date)

, I do not get sleep summary data that contains

'summary': {'stages': {'deep': 84, 'light': 263, 'rem': 104, 'wake': 59},
'totalMinutesAsleep': 463,
'totalSleepRecords': 1,
'totalTimeInBed': 510}}

I was able to get the full sleep data including summary data using just auth_client.sleep() but not using auth_client.time_series('sleep')

Activity

  1. salvador-moreno commented on Jun 4, 2019

    @salvador-moreno

    I do not think that is an issue, the 'time_series' method is indicated to retrieve only the sleep data in a finer detail,. If you want to get the summary AND the time series you can always use the client's 'sleep' method.

  2. jakemiller13 commented on Oct 19, 2019

    @jakemiller13

    Tracking Sleep Habits Using Your Fitbit

    I'm working on a project that does exactly what you are looking for. It returns the summary as part of a json object, so you just need to pull it out of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy