Handling API Calls
API_GET.Rd
Small helper function to handle http requests to the API.
Arguments
- URL
the URL to be called.
- config
NULL
orlist
, forwarded tohttr::GET
.- query
NULL
orlist
, forwarded tohttr::GET
.- expected_class
NULL
or character vector. If set, it is checked if the returned object is of this class. If not, a warning will be thrown (no error).- verbose
logical, shows some additional information if
TRUE
.
Value
Returns the object we get from httr::content()
after a successful
API call. If an error is detected, an error with additional details will be displayed.