congress_set_key()
takes a character string API key and saves it as the
environment variable "CONGRESS_API_KEY". If a key has already been set in the
session, congress_set_key()
will warn and prompt the user to choose whether
to overwrite. New keys may be generated at https://api.congress.gov/sign-up/
Usage
congress_set_key(key, warn = FALSE)
congress_get_key()
Arguments
- key
Character string API key to be saved as environmental variable "CONGRESS_API_KEY".
- warn
Warn user when attempting to overwrite an existing key? If set
to TRUE, prompts user to decide whether to overwrite.
Value
A character vector of the currently set API key.
Details
congress_get_key()
retrieves the environment variable.
Examples
if (FALSE) {
congress_set_key("YOUR_API_KEY_HERE")
}