R/nsrr_token.R
nsrr_token.Rd
NSRR Token
nsrr_token(token = NULL) nsrr_have_token(token = NULL) nsrr_auth(token = NULL) nsrr_authenticated(token = NULL)
Token for NSRR resources. Found at https://sleepdata.org/token
A character vector or NULL
is.null(nsrr_token()) #> [1] TRUE if (!is.null(nsrr_token())) { res = nsrr_auth() res$authenticated } bad_res = nsrr_auth("") bad_res$authenticated #> [1] FALSE nsrr_have_token() #> [1] FALSE nsrr_authenticated() #> [1] FALSE