R/license_list.R

Defines functions license_list

Documented in license_list

#' Return the list of licenses available for datasets on the site.
#'
#' @export
#' @param id (character) Package identifier.
#' @template args
#' @template key
#' @examples \dontrun{
#' license_list()
#' license_list(as = "table")
#' license_list(as = "json")
#' }
license_list <- function(id, url = get_default_url(), key = get_default_key(),
  as = "list", ...) {

  res <- ckan_GET(url, 'license_list', key = key, opts = list(...))
  switch(as, json = res, list = jsl(res), table = jsd(res))
}

Try the ckanr package in your browser

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

ckanr documentation built on March 31, 2023, 6:54 p.m.