sc_key {STATcubeR} | R Documentation |
Manage your API Keys
Description
Functions to get/set the STATcube API keys and make them available for calls against the STATcube API.
Usage
sc_key(server = "ext", test = FALSE)
sc_key_set(key, server = "ext", test = TRUE)
sc_key_get(server = "ext")
sc_key_prompt(server = "ext", test = TRUE)
sc_key_exists(server = "ext")
sc_key_valid(key = NULL, server = "ext")
Arguments
server |
A STATcube API server. Defaults to the external Server via
|
test |
Use |
key |
( |
Value
All functions return the key (invisibly) except for
sc_key_exists()
and sc_key_valid()
, which return a logical()
of
length one.
Functions
-
sc_key()
: forwards tosc_key_get()
if the key is already present. Otherwise,sc_key_prompt()
will be invoked. -
sc_key_set()
: can be used to pass the key as a parameter (string
) -
sc_key_get()
: returns the key, if it exists. Otherwise, an error is thrown. -
sc_key_prompt()
: prompts for a key viareadline()
-
sc_key_exists()
: returnsTRUE
if a key was set andFALSE
otherwise. -
sc_key_valid()
: performs a test request and returnsTRUE
if the key is valid andFALSE
otherwise.