Learn R Programming

BMRSr (version 1.0.0)

parse_response: Parse the results of a call

Description

Parse the results of a call

Usage

parse_response(response, format, clean_dates = TRUE)

Arguments

response

A response object returned from the API request

format

character string; format of the content of the response object; either "csv" or "xml"

clean_dates

boolean; whether to clean date/time columns

Value

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

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab