R/token.R

Defines functions token

#' @noRd

token <- function(quiet = TRUE) {
  finbif_access_token <- Sys.getenv("FINBIF_ACCESS_TOKEN")
  if (!quiet) {
    message(
      "Using FinBIF access token from environment variable FINBIF_ACCESS_TOKEN"
    )
  }
  if (identical(finbif_access_token, "")) return(NULL)
  finbif_access_token
}

Try the finbif package in your browser

Any scripts or data that you put into this service are public.

finbif documentation built on Jan. 3, 2022, 5:09 p.m.