#' update_resource
#'
#' Update existing resource in DDH
#'
#' @param credentials list: authentication token and cookie
#' @param nid character: Node ID of the resource to be updated
#' @param body json: json object generated by jsonlite::toJSON
#' @param root_url character: API root URL
#'
#'
#' @return list
#' @export
#'
update_resource <- function(credentials = list(cookie = dkanr::get_cookie(),
token = dkanr::get_token()),
nid,
body,
root_url = dkanr::get_url()) {
out <- dkanr::update_node(nid, root_url, body, credentials)
return(jsonlite::fromJSON(out))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.