item_upload_create: Upload file(s) and create a new item

Description Usage Arguments Value Examples

View source: R/item_upload_create.R

Description

Create a new item with files attached, all in one call to SB

Usage

1
item_upload_create(parent_id, files, ..., session = current_session())

Arguments

parent_id

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

files

A string vector of paths to files to be uploaded

...

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

session

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

Value

An object of class sbitem

Examples

1
2
3
4
5
6
7
## Not run: 
# You'll need a parent id for a folder/item
## here, using your highest level parent folder
file <- system.file("examples", "books.json", package = "sbtools")
item_upload_create(user_id(), file)

## End(Not run)

sbtools documentation built on May 29, 2017, 7:40 p.m.