R/zzz.R

Defines functions .onLoad

# nocov start
.onLoad <- function(libname, pkgname) {
  op <- options()
  op.apinsee <- list(
    httr_oauth_cache = NA,
    apinsee.url = "https://api.insee.fr/"
  )
  toset <- !(names(op.apinsee) %in% names(op))
  if (any(toset)) options(op.apinsee[toset])

  httr::set_config(httr::user_agent("https://github.com/InseeFrLab/apinsee"))

  invisible()
}
# nocov end
RLesur/apinsee documentation built on Aug. 1, 2023, 5:44 a.m.