Zotero {c2z}R Documentation

Connect to Zotero API

Description

Wrapper to connect with the Zotero API and the main functions of *c2z*

Usage

Zotero(
  collection.names = NULL,
  collection.key = NULL,
  collection.path = NULL,
  item.key = NULL,
  library = FALSE,
  case.insensitive = TRUE,
  ancestor = FALSE,
  recursive = FALSE,
  create = FALSE,
  limit = 100,
  start = 0,
  get.collections = TRUE,
  get.items = TRUE,
  item.type = NULL,
  all.results = TRUE,
  max.results = NULL,
  collections = NULL,
  items = NULL,
  attachments = NULL,
  metadata = NULL,
  doi = NULL,
  isbn = NULL,
  export = FALSE,
  csl.type = NULL,
  csl.name = "style",
  format = "biblatex",
  save.data = FALSE,
  save.path = NULL,
  bib.name = "references",
  library.type = NULL,
  linkwrap = 1,
  style = "apa",
  locale = "en-US",
  copy = FALSE,
  copy.collections = TRUE,
  copy.items = TRUE,
  copy.extras = TRUE,
  remove.missing = TRUE,
  change.library = FALSE,
  copy.user = TRUE,
  copy.id = NULL,
  copy.api = NULL,
  post = FALSE,
  post.collections = TRUE,
  post.items = TRUE,
  post.attachments = TRUE,
  post.limit = 50,
  delete = FALSE,
  delete.collections = FALSE,
  delete.items = FALSE,
  delete.limit = 50,
  ragnarok = FALSE,
  user = TRUE,
  index = FALSE,
  id = NULL,
  token = NULL,
  token.api = NULL,
  api = NULL,
  force = FALSE,
  base.url = "https://api.zotero.org",
  silent = FALSE,
  zotero = NULL,
  log = list()
)

Arguments

collection.names

Vector of collection names to create or search for, Default: NULL

collection.key

A specified collection key, Default: NULL

collection.path

Vector of nested collection keys, Default: NULL

item.key

A specified item key, Default: NULL

library

Use 'ZoteroLibrary' to fetch collections and items, Default: FALSE

case.insensitive

Disregard letter casing when searching for collections, Default: TRUE

ancestor

Trace the lineage of a collection (i.e., find the top-level collection), Default: FALSE

recursive

Find all nested collections, Default: FALSE

create

Create missing collections, Default: FALSE

limit

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

start

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

get.collections

Fetch collections, Default: TRUE

get.items

Fetch items, Default: TRUE

item.type

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

all.results

Find all results in query, Default: TRUE

max.results

Do you need a limit?, Default: NULL

collections

Predefined collections (as tibble), Default: NULL

items

Predefined metadata (as tibble), Default: NULL

attachments

Predefined attachments (as tibble), Default: NULL

metadata

Predefined metadata in Zoter-format, Default: NULL

doi

Use ZoteroDoi to fetch DOI metadata, Default: NULL

isbn

Use ZoteroIsbn to fetch ISBN metadata, Default: NULL

export

Use 'ZoteroExport' to export items, Default: FALSE

csl.type

Specify a CSL type to Official repository for Citation Style Language (CSL), Default: NULL

csl.name

Name of saved CSL file, Default: 'style'

format

Export format of Zotero items, Default: 'biblatex'

save.data

Save data (e.g., bibliography) to disk, Default: FALSE

save.path

Location to store data on disk, Default: NULL

bib.name

Name of exported bibliography, Default: 'references'

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'

copy

Use 'ZoteroCopy' to delete collections and/or items, Default: FALSE

copy.collections

Try to copy specified collections, Default: TRUE

copy.items

Try to copy specified items?, Default: TRUE

copy.extras

Try to copy specified extras (i.e., attachments and notes)?, Default: TRUE

remove.missing

Deleted missing extras, Default: TRUE

change.library

Stage changing of library (e.g., from a group to a personal library), Default: FALSE

copy.user

New user type (The functions will use 'group' as prefix if FALSE), Default: TRUE

copy.id

New id, Default: NULL

copy.api

New API key. Set API to 'NA' if key is not needed, Default: NULL

post

Use 'ZoteroPost' to post collections and/or items, Default: FALSE

post.collections

Try to copy specified collections, Default: TRUE

post.items

Try to copy specified items?, Default: TRUE

post.attachments

Try to copy specified extras (i.e., attachments and notes)?, Default: TRUE

post.limit

Number of collections/items to post per request (max 50), Default: 50

delete

Use 'ZoteroDelete' to delete collections and/or items, Default: FALSE

delete.collections

Try to delete specified collections, Default: TRUE

delete.items

Try to delete specified items?, Default: TRUE

delete.limit

Number of collections/items to delete per request (max 50), Default: 50

ragnarok

Delete EVERYTHING in the specified library, Default: FALSE

user

User type (The functions will use 'group' as prefix if FALSE), Default: TRUE

index

Create an index of items, Default: FALSE

id

User or group ID, Default: NULL

token

Name of user or group token as defined in '.Renviron', Default: NULL

token.api

Name of API token as defined in '.Renviron', Default: NULL

api

API key to connect with the Zotero library. Set API to 'NA' if key is not needed. See Zotero API, Default: NULL

force

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

base.url

Base url of the Zotero API, Default: 'https://api.zotero.org'

silent

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

zotero

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

log

A list for storing log elements, Default: list()

Details

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

Value

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

See Also

http_error, GET

Examples

# Create the default Zotero list
example <- Zotero(id = "9913421", api = "RqlAmlH5l1KPghfCseAq1sQ1")
# Print the interesting pars of an otherwise empty list
print(tail(example,5))

[Package c2z version 0.2.0 Index]