R/supported_states.R

Defines functions ps_supported_states

Documented in ps_supported_states

#' List Currently Supported States
#'
#' @return tibble of supported states
#' @export
#'
#' @concept info
#'
#' @examples
#' ps_supported_states()
ps_supported_states <- function() {
  httr2::request('https://api.planscore.org/states') |>
    httr2::req_perform() |>
    httr2::resp_body_json() |>
    lapply(function(y) dplyr::bind_cols(y, .name_repair = ~ c('state', 'type'))) |>
    dplyr::bind_rows()
}

Try the planscorer package in your browser

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

planscorer documentation built on Sept. 24, 2024, 5:08 p.m.