Description Usage Arguments Value
Function to wrap aroung httr::POST
, sending the request body to the API.
1 2 3 4 | callTargomoAPI(api_key = Sys.getenv("TARGOMO_API_KEY"),
region = Sys.getenv("TARGOMO_REGION"), service, body,
config = list(), verbose = FALSE, progress = FALSE,
timeout = NULL)
|
api_key |
The Targomo API key. |
region |
The Targomo region. |
service |
The Targomo service - 'polygon', 'route', or 'time'. |
body |
A request body made with |
config |
Config options to pass to |
verbose |
Display info on the API call? |
progress |
Display a progress bar? |
timeout |
Timeout in seconds (leave NULL for no timeout/curl default). |
A httr response object with the API response (whether successful or not).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.