Retrieves API key from environment if available.

get_vrd_key()

Value

VRD_API access key if set in environment. If access key is not available, returns an error that the API key is not found and needs to either be set in the environment or passed as an argument into functions.

Details

An API key is required to use the functions in caRecall and query the Vehicle Recalls Database. The key can be acquired at https://tc.api.canada.ca/en/detail?api=VRDB.

The key can be set in the environment using Sys.setenv(VRD_API = 'your_API_key_here'). Alternatively, instead of setting the API key in the environment, the key can be passed into the functions as an argument.

Examples

if (FALSE) { get_vrd_key() }