R/new_file_type.R

Defines functions new_file_type

Documented in new_file_type

#' Post entry to file_type table
#'
#' Upload information to the \code{file_type} table in the data registry
#'
#' @param name a \code{string} specifying the name of the file type
#' @param extension a \code{string} specifying the filename extension
#' @param endpoint a \code{string} specifying the registry endpoint
#'
#' @family new functions
#'
new_file_type <- function(name,
                          extension,
                          endpoint = "http://localhost:8000/api/") {

  post_data(table = "file_type",
            data =  list(name = name,
                         extension = extension),
            endpoint = endpoint)
}

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.