items: Fetch Zotero library items

View source: R/items.R

itemsR Documentation

Fetch Zotero library items

Description

Retrieves items belonging to a Zotero user or group library, optionally limited to a specific collection. Trashed items are never included.

Usage

items(collection_key = NULL, incl_children = TRUE, as_tibble = TRUE, ...)

Arguments

collection_key

Collection key, see collections(). If NULL, all items in the library are returned.

incl_children

Whether or not to include child items from sub-collections beneath the collection_key's or the library's (if collection_key = NULL) top level.

as_tibble

Whether or not to convert the resulting list to a tibble (with nested list columns). If FALSE, a bare list is returned instead which also retains all additional API metadata fields besides the actual items data. See as_item_tibble() for details.

...

Other arguments passed to zotero_api()

Value

A tibble if as_tibble = TRUE, otherwise a list.

Note that the returned object is of length 0 if the Zotero library's content hasn't changed since the version number specified in modified_since. Otherwise it has a version attribute set to the Zotero library version number returned by the API.

See section Caching in zotero_api() for further details.

See Also

Other Zotero items functions: add_archive_url(), as_item_tibble(), write_bib()

Examples

# items from public libraries can be fetched without an API key
items(collection_key = "MSNU4A4F", user = zotero_group_id(id = 197065))

# when no collection key is supplied, the whole library is fetched
items(user = zotero_group_id(id = 197065))

# optionally, the retrieval ca be limited to top-level items only
items(incl_children = FALSE, user = zotero_group_id(id = 197065))

mbojan/zoterro documentation built on Oct. 18, 2023, 12:10 p.m.