Get or set the LegiScan API key for the current session. To request for an API key from LegiScan, go to https://legiscan.com/legiscan.

legiscan_api_key(set_new = FALSE)

Arguments

set_new

Set a new LegiScan API key for the current environment. Default is FALSE.

Value

atomic character vector containing the LegiScan API key

Details

The API wrapper functions in this package will look for a LegiScan API key residing in the environment variable LEGISCAN_API_KEY. Call this function at the beginning of a new session to set the key for the current R session. Or enter `file.edit("~/.Renviron")` in the console and make this edit to the file `LEGISCAN_API_KEY = "you_api_key"` to set key on your local machine.