sleep_single_day | R Documentation |
Sleep Data of single day
sleep_single_day(
user_id,
token,
date = "2021-03-09",
ggplot_color_palette = "ggsci::blue_material",
show_nchar_case_error = 135,
verbose = FALSE
)
user_id |
a character string specifying the encoded ID of the user. For instance '99xxxx' of the following URL 'https://www.fitbit.com/user/99xxxx' of the user's account corresponds to the 'user_id' |
token |
a character string specifying the secret token that a user receives when registers a new application in https://dev.fitbit.com/apps |
date |
a character string specifying the Date for which the sleep data should be returned. For instance, the date '2021-12-31' where the input order is 'year-month-day' |
ggplot_color_palette |
a character string specifying the color palette to be used. For a full list of palettes used in the ggplot see: https://pmassicotte.github.io/paletteer_gallery/ The following color-palettes were tested and work well: "rcartocolor::Purp", "rcartocolor::Teal" |
show_nchar_case_error |
an integer that specifies the number of characters that will be returned in case on an error. The default value is 135 characters. |
verbose |
a boolean. If TRUE then information will be printed out in the console |
an object of class list
## Not run:
require(fitbitViz)
USER_ID = '99xxxx'
token = 'my_long_web_api_token'
lst_out = sleep_single_day(user_id = USER_ID,
token = token,
date = '2021-03-09',
ggplot_color_palette = 'ggsci::blue_material',
show_nchar_case_error = 135,
verbose = TRUE)
str(lst_out)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.