config: KTH APIs configuration

View source: R/utils.R

configR Documentation

KTH APIs configuration

Description

This function provides a list with settings for the base url and user agent used in API calls, and the relevant API keys required.

Usage

config()

Details

Please edit your ~./Renviron file and set values for environment variables KTH_API_KEY_DIRECTORY, KTH_API_KEY_PROFILES and KTH_API_KEY_PUBLICATIONS you can use file.edit("~/.Renviron"); readRenviron("~/.Renviron"))

See Also

user_agent

Examples

## Not run: 
if (interactive()) {

# how to change the config
my_cfg <- config()
my_cfg$ua <- httr::user_agent("My own user agent string")
my_cfg$verbose <- TRUE

# then use this config when making calls
kth_profile_legacy("tjep", config = my_cfg)
 }

## End(Not run)

KTH-Library/kthapi documentation built on June 27, 2023, 9:27 p.m.