R/hs_results.R

Defines functions num_results hs_content list_results

# Exported functions ----

# Internal functions ----

num_results <- function(hs_response) {
  list_results(hs_response)$total
}

hs_content <- function(hs_response) {
  httr::content(hs_response, as = "text")
}

# Return flattened results
list_results <- function(hs_response) {
  jsonlite::fromJSON(hs_content(hs_response), flatten = TRUE)
}

# Input checking ----

Try the hypothesisr package in your browser

Any scripts or data that you put into this service are public.

hypothesisr documentation built on May 2, 2019, 5:07 a.m.