Parse the results of a call

parse_response(response, format = NULL, clean_dates = TRUE,
  rename = TRUE)

Arguments

response

A response object returned from the API request

format

character string; NULL to use response service type or "csv" or "xml" to force that format

clean_dates

boolean; whether to clean date/time columns

rename

boolean; whether to rename column headings (they are usually blank from the API)

Value

A tibble if format == "csv", otherwise a list

Examples

list_example <- parse_response( send_request( build_call("TEMP", api_key = "12345", from_date = "01 Jun 2019", to_date = "10 Jun 2019", service_type = "xml") ), "xml")