Skip to contents

Retrieves the parent of a supplied item based on the ScienceBase item tree hierarchy.

Usage

item_get_parent(sb_id, ...)

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.

Value

An item object representing the parent of the supplied item.

Examples

# \donttest{
item_get_parent("4f4e4b24e4b07f02db6aea14")
#> Request failed [404]. Retrying in 1 seconds...
#> Request failed [404]. Retrying in 1.1 seconds...
#> Warning: Sciencebase returned '404' -- item doesn't exist or is secured
#> NULL

item_get_parent(item_get("4f4e4b24e4b07f02db6aea14"))
#> Request failed [404]. Retrying in 1.7 seconds...
#> Request failed [404]. Retrying in 1 seconds...
#> Warning: Sciencebase returned '404' -- item doesn't exist or is secured
#> Request failed [404]. Retrying in 1.7 seconds...
#> Request failed [404]. Retrying in 1 seconds...
#> Warning: Sciencebase returned '404' -- item doesn't exist or is secured
#> NULL
# }