Description Usage Arguments Details Value Examples
View source: R/citymappr_setup.R
Initialize the API key citymappR
will send in every request for authentication.
If a file is found at the location specified in config_file
, the values will be used.
1 | citymappr_setup(config_file = ".citymappr", api_token = NULL, echo = FALSE)
|
config_file |
a configuration file in DCF format. See read.dcf. By default the key will be searched in the current working directory. |
api_token |
Citymapper's api key (chr). |
echo |
display the |
1 | api_token: YOUR_TOKEN_STRING
|
An env variable
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Reads from default file (i.e ~/.citymappr)
citymmappr_setup()
# Reads from alternate config file
citymappr_setup("~/path/to/config")
# The manual way
citymappr_setup(api_token = "your_api_string")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.