ors_api_key | R Documentation |
Get/set openrouteservice API key.
ors_api_key(key, service = "openrouteservice", username = NULL, keyring = NULL)
key |
API key value provided as a character scalar |
service |
Service name, a character scalar. |
username |
Username, a character scalar, or |
keyring |
For systems that support multiple keyrings, specify
the name of the keyring to use here. If |
To set the key provide it in the key
argument. To retrieve the current
value call the function with key
unset.
Typically the key is saved in the system credential store. Once the key is defined, it persists in the keyring store of the operating system so it doesn't need to be set again in a new R session.
Internally the function uses \link[keyring]{key_set}
and
\link[keyring]{key_get}
. The use of keyring package can be bypassed by
providing the key in the environment variable ORS_API_KEY. The value from the
environment variable takes precedence over the value stored in the system
credential store. The default environment variable name used to retrieve the
openrouteservice api key can be overridden by specifying it in
options("openrouteservice.api_key_env")
.
API Key value when called without key
.
Andrzej Oleś andrzej.oles@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.