R/packages.R

Defines functions get_packages

Documented in get_packages

#' Packages
#'
#' @param universe universe to query
#'
#' @return A character vector.
#' @export
#'
#' @examples
#' get_packages("ropensci")
get_packages <- function(universe) {
  url <- sprintf("https://%s.r-universe.dev/packages", universe)
  resp <- httr::RETRY("GET", url)
  httr::stop_for_status(resp, "take off")
  content <- httr::content(resp)
  unlist(content)
}
rjlopez2/applepie documentation built on Dec. 27, 2021, 12:15 a.m.