R/servers.R

Defines functions servers

Documented in servers

#' ERDDAP server URLS and other info
#'
#' @export
#' @param ... curl options passed on to [crul::verb-GET]
#' @return data.frame with 3 columns:
#' 
#' - name (character): ERDDAP name
#' - url (character): ERDDAP url
#' - public (logical): whether it's public or not
#' 
#' @examples \dontrun{
#' servers()
#' }
servers <- function(...) {
  surl <- "https://irishmarineinstitute.github.io/awesome-erddap/erddaps.json"
  tt <- crul::HttpClient$new(url = surl, opts = list(...))$get()
  tt$raise_for_status()
  tibble::as_tibble(jsonlite::fromJSON(tt$parse("UTF-8")))
}

Try the rerddap package in your browser

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

rerddap documentation built on Aug. 23, 2023, 9:06 a.m.