#' Set/get Genius API client access token
#' @rdname token
#'
#' @description `genius_set_token` is to be called once before any API requests
#' to write your token to the environment variable
#' `GENIUS_CLIENT_ACCESS_TOKEN`.
#' @param token a character containing your token
#' @export
#'
#' @examples
#' genius_set_token("blablabla")
#' genius_get_token()
genius_set_token <- function(token){
## check that character of length 1
Sys.setenv(GENIUS_CLIENT_ACCESS_TOKEN = token)
}
#' @rdname token
#' @export
genius_get_token <- function(){
Sys.getenv("GENIUS_CLIENT_ACCESS_TOKEN")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.