Obtains and parses data from JSON, CSV, and NeXML-returning API endpoints, respectively.

get_json_data(url, query, verbose = FALSE, ensureNames = NULL)

get_csv_data(url, query, ..., verbose = FALSE)

get_nexml_data(url, query, verbose = FALSE)

Arguments

url

character, the URL of the API endpoint to query

query

list, the query parameters and values in the form of a named list

verbose

logical, whether to print message when parsing results

ensureNames

character, which column or list names to ensure are included in the result to be returned. If result returned by the API endpoint does not include them, they will be added, with NA values.

...

for get_csv_data, additional parameters to be passed on to read.csv()

Value

For get_json_data, a data frame or list, depending on the result of jsonlite::fromJSON().

For get_csv_data, a data frame.

For get_nexml_data, a nexml object.

Details

These are package-internal functions.