set_token <- function() {
old_token <- Sys.getenv("YELP_ACCESS_TOKEN", NA)
if(is.na(old_token)) {
Sys.setenv(
YELP_ACCESS_TOKEN = readRDS(test_path("sample_yelp_access_token.rds"))
)
}
invisible(old_token)
}
unset_token <- function(token) {
if(nzchar(token)) {
Sys.setenv(YELP_ACCESS_TOKEN = token)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.