R/org_exists.R

Defines functions org_exists github_api_get_org

Documented in org_exists

github_api_get_org = function(org) {
  arg_is_chr_scalar(org)

  ghclass_api_v3_req(
    endpoint = "/orgs/:org",
    org = org
  )
}


#' @rdname org_details
#' @export
#'
org_exists = function(org) {
  arg_is_chr(org)

  res = purrr::map(org, purrr::safely(github_api_get_org))
  purrr::map_lgl(res, succeeded)
}

Try the ghclass package in your browser

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

ghclass documentation built on May 29, 2024, 8:44 a.m.