#' Set the Stattleship API token
#'
#' A simple function to set the Stattleship API token in an R environment variable
#'
#' @param token character. A valid Stattleship API token
#' @examples
#' \dontrun{
#' set_token("insert-your-token-here")}
#' @export
#' set_token
set_token <- function(token){
if(!is.null(token)){
.StattleEnv$data$token <- token
}
else{
warning("Stattleship API token must be provided in order to access the Stattleship API.")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.