R/get_author_url.R

Defines functions get_author_url

Documented in get_author_url

#' get_author_url
#'
#' @param endpoint a \code{string} specifying the registry endpoint
#'
get_author_url <- function(endpoint) {
  user_url <- get_url(table = "users",
                      query = list(username = "admin"),
                      endpoint = endpoint)
  assertthat::assert_that(length(user_url) == 1)
  user_id <- extract_id(user_url, endpoint = endpoint)
  user_author_url <- get_entry("user_author",
                               query = list(user = user_id),
                               endpoint = endpoint)
  assertthat::assert_that(length(user_author_url) == 1)
  user_author_url[[1]]$author
}

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.