% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitbit_utils.R
\name{sleep_single_day}
\alias{sleep_single_day}
\title{Sleep Data of single day}
\usage{
sleep_single_day(
  sleep_data,
  date = "2021-03-09",
  ggplot_color_palette = "ggsci::blue_material",
  verbose = FALSE
)
}
\arguments{
\item{sleep_data}{a list object containing the pre-downloaded sleep data for the specified date. This is the parsed
JSON response from the Fitbit sleep endpoint (e.g. \code{jsonlite::fromJSON()} on the API response for
\code{/1.2/user/[user-id]/sleep/date/[date]/[date].json}). The list must have a \code{$sleep} element.}

\item{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'}

\item{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"}

\item{verbose}{a boolean. If TRUE then information will be printed out in the console}
}
\value{
an object of class list
}
\description{
Sleep Data of single day
}
\examples{
\dontrun{

require(fitbitViz)

# 'sleep_data_day' is the parsed JSON list for a single date from the Fitbit sleep endpoint

lst_out <- sleep_single_day(
  sleep_data = sleep_data_day,
  date = "2021-03-09",
  ggplot_color_palette = "ggsci::blue_material",
  verbose = TRUE
)
str(lst_out)
}
}
