api: Get data from API.

Description Usage Arguments Value Examples

Description

Get data from API.

Usage

1
2
3
api(url, path = NULL, parms = NULL, do.cache = TRUE,
  cache.path = NULL, cache.name = "api-cache",
  use.cache.same.day = TRUE, verbose = TRUE)

Arguments

url

The URL of the API. You can set this up hou you like but it usually starts with htt and ends with .com or similar.

path

The second part of the URL which varies by the service you are using.

do.cache

Save a cache of the output to be used instead of the API in case of an error, etc.

cache.path

Path to save a cache to. Leave this blank and just use cache name if you wnat.

cache.name

File name to use for the cache. Cache will always be a .RDS so you don't need to include the path.

use.cache.same.day

Use the cache instead of calling the API again if the cache is the same day. Useful when you have limited API calls to an API.

verbose

Print helpful messages about the API.

params

Named list/vector of key value pairs representing the arguments.

Value

List of data from the API.

Examples

1
#TODO

superchordate/bc documentation built on June 20, 2019, 4:05 p.m.