set_os_key | R Documentation |
In order to use the Ordnance Survey Data Hub a valid API key is required.
set_os_key(apikey)
get_os_key()
has_os_key()
apikey |
(character) Required project API key. |
Stores the user provided character string in an environment variable
named OS_API_KEY
. No validation of the key is applied when storing.
To obtain a key go to https://osdatahub.os.uk/.
Be careful not to reveal secrets including API keys. This function
may print the API key to the console. It is used internally by the
osdatahub
query functions.
Primarily this is used internally to control when examples are executed.
(Invisibly) A logical value from Sys.setenv
whether an
environment variable was set.
If an environment variable named OS_API_KEY
is present, the
character string for the variable is returned.
If an environment variable named OS_API_KEY
is present, then
TRUE
, else this function returns FALSE
.
set_os_key('my-api-key')
my_api_key <- get_os_key()
has_os_key()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.