related_delete {ckanr}R Documentation

Delete a related item.

Description

Delete a related item.

Usage

related_delete(id, url = get_default_url(), key = get_default_key(), ...)

Arguments

id

(character) Resource identifier.

url

Base url to use. Default: https://data.ontario.ca See also ckanr_setup() and get_default_url().

key

A privileged CKAN API key, Default: your key set with ckanr_setup

...

Curl args passed on to crul::verb-POST (optional)

Examples

## Not run: 
# Setup
ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key"))

# create a package and a related item
res <- package_create("hello-venus2") %>%
   related_create(title = "my resource",
                  type = "visualization")

# show the related item
related_delete(res)
## or with id itself:
## related_delete(res$id)

## End(Not run)

[Package ckanr version 0.7.0 Index]