key_actions {RDota2} | R Documentation |
This function makes the key accessible to all functions.
Description
key_actions
will allow the user to register (set), get (retrieve) or delete the key.
Usage
key_actions(action = c("register_key", "get_key", "delete_key"),
value = NULL)
Arguments
action |
Which action to perform. Check the details. |
value |
The steam key to use. It is used only in the |
Details
There are three actions that can be performed in this function:
-
register_key This action sets the key and at the same time makes it available to all the other functions. The key argument in the api calls (i.e. functions) should not be used after setting the key with
key_actions
. It is good practice to store the key in an environment variable in .Renviron and then useSys.getenv()
to retrieve it. This technique is described in detail in https://github.com/LyzandeR/RDota2 in the readme file. -
get_key Returns the current key.
-
delete_key Deletes the key.
Value
A dota_api object containing the elements described in the details.
Examples
## Not run:
key_actions(action = 'register_key', value = Sys.getenv('RDota_KEY'))
key_actions(action = 'register_key', value = 'xxxxxxxxxxxxx')
key_actions(action = 'get_key')
key_actions(action = 'delete_key')
## End(Not run)