#' create_dataset
#'
#' Create new dataset in DDH
#'
#' @param root_url character: API root URL
#' @param body json: JSON object generated by jsonlite::toJSON
#' @param credentials list: authentication token and cookie
#'
#' @return list
#' @export
#'
create_dataset <- function(body,
root_url = dkanr::get_url(),
credentials = list(cookie = dkanr::get_cookie(),
token = dkanr::get_token())) {
out <- dkanr::create_node(url = root_url,
body = body,
credentials = credentials)
return(jsonlite::fromJSON(out))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.