get_data | R Documentation |
Obtains and parses data from JSON, CSV, and NeXML-returning API endpoints, respectively.
get_json_data(
url,
query,
verbose = FALSE,
ensureNames = NULL,
forceGET = FALSE,
cleanNames = FALSE
)
get_csv_data(url, query, ..., verbose = FALSE, forceGET = FALSE)
get_nexml_data(url, query, verbose = FALSE, forceGET = FALSE)
get_plain_text(url, query, verbose = FALSE)
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. |
forceGET |
logical, whether to force using the HTTP GET method for API access regardless of request length. The default is FALSE, meaning queries exceeding a certain size for transmission will automatically use HTTP POST for accessing the KB API. |
cleanNames |
for |
... |
for |
These are package-internal functions.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.