Description Usage Arguments Details Value
Returns a summary and list of a user's sleep log entries as well as minute by minute sleep entry data for a given day in the format requested. The response includes summary for all sleep log entries for the given day (including naps.) If you need to fetch data only for the user's main sleep event, you can send the request with isMainSleep=true or use a Time Series call.
1 | get_sleep_logs(token, date)
|
token |
An OAuth 2.0 token |
date |
The date of records to be returned in the format "yyyy-MM-dd" or "today" as a string or Date object. |
The relationship between sleep log entry properties is expressed with the following equation: timeInBed = minutesToFallAsleep + minutesAsleep + minutesAwake + minutesAfterWakeup
Also, values for minuteData can be 1 ("asleep"), 2 ("awake"), or 3 ("really awake").
a list of "sleep" and "summary" data.frame. "sleep" data.frame contains time series information of sleep. "summary" data.frame contains the summary of each "sleep" information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.