R/get_tables.R

Defines functions get_tables

Documented in get_tables

#' Get tables from registry
#'
#' Use api endpoint to produce a list of tables
#' @param endpoint a \code{string} specifying the registry endpoint
#'
#' @return a character vector of tables
#' @keywords internal
#'
get_tables <- function(endpoint = "http://localhost:8000/api/") {

  httr::GET(endpoint) %>%
    httr::content(as = "text", encoding = "UTF-8") %>%
    jsonlite::fromJSON(simplifyVector = FALSE) %>%
    names()
}

Try the rDataPipeline package in your browser

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

rDataPipeline documentation built on Nov. 18, 2021, 1:14 a.m.