Skip to contents

mm_parsed_extract() extracts a data frame from the parsed response body.

Usage

mm_parsed_extract(parsed, .get = "data")

extract_data(parsed)

extract_criteria_or_labels(parsed)

extract_schema(parsed)

Arguments

parsed

Parsed response body.

.get

Whether the GET request is for the endpoint's "data", "criteria", "labels", or "schema".

Value

A data frame containing the endpoint data.

Examples

# Returns NULL from empty list
resp <- httr2::response_json()
resp |>
  megamation:::mm_resp_parse() |>
  megamation:::mm_parsed_extract()
#> NULL