citymappr_setup: Setup env variables for Citymapper's API access

Description Usage Arguments Details Value Examples

View source: R/citymappr_setup.R

Description

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.

Usage

1
citymappr_setup(config_file = ".citymappr", api_token = NULL, echo = FALSE)

Arguments

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 api_token (bool), initally set as FALSE

Details

1
api_token: YOUR_TOKEN_STRING

Value

An env variable

Examples

 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)

andodet/citymappR documentation built on Oct. 18, 2021, 6:11 p.m.