Description Usage Arguments Details Value Examples
key_actions
will allow the user to register (set), get (retrieve) or delete the key.
1 2 | key_actions(action = c("register_key", "get_key", "delete_key"),
value = NULL)
|
action |
Which action to perform. Check the details. |
value |
The steam key to use. It is used only in the |
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 use Sys.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.
A dota_api object containing the elements described in the details.
1 2 3 4 5 6 7 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.