query_item_identifier: Query SB for items based on custom identifier

View source: R/query_items.R

query_item_identifierR Documentation

Query SB for items based on custom identifier

Description

Find all items under a scheme or also query by for a specific type and key

Usage

query_item_identifier(scheme, type = NULL, key = NULL, ..., limit = 20)

Arguments

scheme

The identifier scheme

type

(optional) The identifier type

key

(optional) The identifier key

...

Additional parameters are passed on to GET

limit

Max number of matching items to return

Value

The SB item id for the matching item. NULL if no matching item found.

Examples

## Not run: 
authenticate_sb()

ex_item = item_create(title='identifier example')
item_update_identifier(ex_item, 'project1', 'dataset1', 'key1')
ex2_item = item_create(title='identifier example 2')
item_update_identifier(ex2_item, 'project1', 'dataset1', 'key2')


#query the specific item
query_item_identifier('project1', 'dataset1', 'key1')

#or get the collection of items based on the ID hierarchy
query_item_identifier('project1')

item_rm(ex_item)
item_rm(ex2_item)

## End(Not run)


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