Skip to contents

Get

Usage

ZoteroGet(
  zotero,
  use.collection = TRUE,
  use.item = FALSE,
  append.collections = FALSE,
  append.items = FALSE,
  append.top = FALSE,
  append.file = FALSE,
  custom.url = NULL,
  open.query = NULL,
  limit = 100,
  start = 0,
  format = "json",
  item.keys = NULL,
  collection.keys = NULL,
  item.type = NULL,
  library.type = NULL,
  linkwrap = 1,
  style = "apa",
  locale = "en-US",
  all.results = TRUE,
  max.results = NULL,
  result.type = NULL,
  force = FALSE,
  silent = FALSE
)

Arguments

zotero

A list with information on the specified Zotero library (e.g., id, API key, collections, and items)

use.collection

Use collection key if present in Zotero list, Default: TRUE

use.item

Use item key if present in Zotero list, Default: FALSE

append.collections

Append `/collections/` to Zotero API url, Default: FALSE

append.items

Append `/items/` to Zotero API url, Default: FALSE

append.top

Append `/top/` to Zotero API url, Default: FALSE

append.file

Append `/file/` to Zotero API url, Default: FALSE

custom.url

Use a custom Zotero API url, Default: NULL

open.query

Use your own query, Default: NULL

limit

Number of results per query (max 100), Default: 100

start

Starting position of query (0 = first result), Default: 0

format

Format of response from the Zotero API, Default: 'json'

item.keys

Specified vector of items keys, Default: NULL

collection.keys

Specified vector of collection keys, Default: NULL

item.type

Items to search for (NULL = everything), Default: NULL

library.type

Commma-separated data from Zotero (i.e., data, bib, citation), Default: NULL

linkwrap

Set URL (e.g., DOI) as HTML link (1 = yes), Default: 1

style

Citation style to use for appended bibliography and/or citations, Default: apa

locale

Desired language format of bibliography, Default: 'en-US'

all.results

Find all results in query, Default: TRUE

max.results

Do you need a limit?, Default: NULL

result.type

Pointless linguistics to display result type (default = `result`), Default: NULL

force

Force is seldom wise, but sometimes..., Default: FALSE

silent

c2z is noisy, tell it to be quiet, Default: FALSE

Value

A list with information on the specified Zotero library (e.g., collections and items)

Details

Please see https://oeysan.github.io/c2z/

See also

Examples

# \donttest{
  # Define Zotero list according to default setings
  zotero = Zotero(
    user = FALSE,
    id = "5250382",
    api = "RqlAmlH5l1KPghfCseAq1sQ1"
  )

  # Query default group Zotero library for 1 item
  example <- ZoteroGet(
    zotero,
    max.results = 1
  )
#> Found 1 result 

  # Print index using `ZoteroIndex`
  if (any(nrow(example$results))) {
  ZoteroIndex(example$results) |>
    dplyr::select(name) |>
    print(width = 80)
  }
#> # A tibble: 1 × 1
#>   name                                                                          
#>   <chr>                                                                         
#> 1 Serra-Garcia & Gneezy (2021) Nonreplicable publications are cited more than r…
# }