items_rm: Remove items from SB

View source: R/items_rm.R

items_rmR Documentation

Remove items from SB

Description

FIXME: not working yet - httr doesn't allow body in DELETE

Usage

items_rm(sb_id, ..., recursive = FALSE, session = current_session())

Arguments

sb_id

An sbitem object or a character ScienceBase ID corresponding to the item

...

Additional parameters are passed on to GET, POST, HEAD, PUT, or DELETE

recursive

logical, FALSE by default. CAUTION: setting recursive=TRUE means that not only will this item be deleted, but so will all its child items and their child items and so on.

session

Session object from authenticate_sb. Defaults to anonymous or last authenticated session

Value

httr response object

Examples

## Not run: 
# helper function to make a random name
aname <- function() paste0(sample(letters, size = 5, replace = TRUE), collapse = "")

# Create some items - by default we use your user ID
res <- items_create(title = c(aname(), aname()))
items_rm(res)

## End(Not run)

sbtools documentation built on May 1, 2023, 1:07 a.m.