R/get_token.R

Defines functions get_token

get_token = function(api_key) {
  if (is.null(api_key)) {
    api_key = Sys.getenv("UPTIME_ROBOT_TOKEN", NA)
  }
  if (is.na(api_key)) {
    stop("API Key missing", call. = FALSE)
  }
  api_key
}
jumpingrivers/uprobot documentation built on May 12, 2022, 7:37 p.m.