item_create: Create a new SB item

View source: R/item_create.R

item_createR Documentation

Create a new SB item

Description

Create a new item on ScienceBase with the requested parent and item title. Info can be provided to populate metadata at the time of creation.

Usage

item_create(parent_id = user_id(), title, ..., info)

Arguments

parent_id

An sbitem object or character ScienceBase ID corresponding to the parent item (folder)

title

The title of the new SB item

...

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

info

(optional) list of metadata info for the new item

Value

An object of class sbitem

Examples

## Not run: 
# Create an item - by default we use your user ID
item_create(title = "testing 123")

# Pass an object of class sbitem
x <- folder_create(user_id(), "foobar456")
item_create(x, "foobar456-item")

## End(Not run)

USGS-R/sbtools documentation built on June 1, 2024, 9:47 p.m.