R/new_user_author.R

Defines functions new_user_author

Documented in new_user_author

#' Post entry to user_author table
#'
#' Upload information to the \code{user_author} table in the data registry
#'
#' @param user_url a \code{string} specifying the URL of an existing
#' \code{user}
#' @param author_url a \code{string} specifying the URL of an existing
#' \code{author}
#' @param endpoint a \code{string} specifying the registry endpoint
#'
#' @family new functions
#'
new_user_author <- function(user_url,
                            author_url,
                            endpoint = "http://localhost:8000/api/") {

  data <- list(user = user_url,
               author = author_url)

  post_data(table = "user_author",
            data =  data,
            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.