Stores ProPublica API key as an environment variable for current and/or future sessions

ppc_api_key(api_key = NULL, set_renv = FALSE)

Arguments

api_key

The actual API key string provided by ProPublica..

set_renv

Logical indicating whether to append the environment variable to the home directory's ".Renviron" file. This requires directory permission, but it will ensure that future sessions automatically find the token. The default is FALSE (do NOT set in ~/.Renviron).

Value

the API key string

Examples

## this is not a real key ppc_api_key("as9d78f6aayd9fy2fq378a9ds876fsas89d7f")
#> [1] "as9d78f6aayd9fy2fq378a9ds876fsas89d7f"