#' update_dataset
#'
#' Update existing in DDH
#'
#' @param nid character: Node ID of the dataset to be updated
#' @param body json: json object generated by jsonlite::toJSON
#' @param root_url character: API root URL
#' @param credentials list: authentication token and cookie
#'
#'
#' @return list
#' @export
#'
update_dataset <- function(nid,
body,
root_url = dkanr::get_url(),
credentials = list(cookie = dkanr::get_cookie(),
token = dkanr::get_token())) {
out <- dkanr::update_node(nid = nid,
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.