#' attach_resource_to_dataset
#' link resources to dataset
#'
#' @param credentials list: object returned by the get_credentials() function
#' @param body json: json object generated by jsonlite::toJSON
#' @param root_url character: API root URL
#' @param dataset_nid character: Node ID of the dataset to be updated
#'
#' @return list
#' @export
#'
attach_resource_to_dataset <- function(credentials = list(cookie = dkanr::get_cookie(), token = dkanr::get_token()),
body, root_url = dkanr::get_url(), dataset_nid) {
ddhconnect::update_dataset(credentials = credentials,
nid = dataset_nid,
body = body,
root_url = root_url
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.