fetch: fetch

Description Usage Arguments Value Examples

View source: R/fetch.R

Description

API fetch function

Usage

1
2
3
4
5
fetch(
  date_str = as.character(Sys.Date()),
  url = "http://api.thenmap.net/v2/world-2/geo/",
  contains_date = TRUE
)

Arguments

date_str

a date string expressed as "yyyy-mm-dd". if contains_date is set to FALSE, this should be left blank

url

a url pointing to a geojson file

contains_date

a boolean indicating whether or not to include the date_str at the end of the url

Value

Returns a list with the data as well as a note if there was no data the specified date.

Examples

1
fetch("2000-01-01")

hankOlofs/api_fetch documentation built on Oct. 8, 2020, 5:41 a.m.