Setting swissgeo Options

Description

Allows the user to overwrite a series of default options used in the package, mainly fine-tuning how the HTTPS requests are handled.

Usage

sg_options(
  timeout = 20,
  retry = 3,
  capacity = 3,
  filltime = 3,
  apiurl = NULL,
  verbose = FALSE
)

Arguments

timeout positive numeric, forwarded to httr2::req_timeout(). Defaults to 20 seconds.
retry positive integer, forwarded to httr2::req_retry(). Defaults to 3 (three retries).
capacity positive integer, forwarded to httr2::req_throttle(). Defaults to size 3.
filltime positive numeric, forwarded to httr2::req_throttle(). Defaults to size 3.
apiurl NULL (default) or character. Allows to overwrite the main URL (mainly for testing).
verbose logical, defaults to FALSE.

Details

A series of default options is set every time the package is attached. They can be overruled by the user calling this function.

Value

Invisibly returns the current swissgeo settings, these are used in the sg_* functions for request handling.

Author(s)

Reto