papaja (version 0.1.0.9842)

fetch_zotero_refs: Save a collection from a Zotero-Account to a BibTeX-file

Description

Downloads and saves a Zotero reference library (or a subset) and saves it as BibTeX file.

Usage

fetch_zotero_refs(x, bib_name, API_key = NULL, collection = NULL,
  lib_type = "user")

Arguments

x

Character. Zotero user or group ID, see details.

bib_name

Character. Name of the BibTeX-file references are saved to.

API_key

Character. Zotero API key, see details.

collection

Character. Optional ID of a collection in the Zotero library, see details.

lib_type

Character. Specifies if the supplied ID is associated with a Zotero user or group.

Value

Returns bib_name invisibly.

Details

This function retrieves references through the Zotero web API. x takes a Zotero user or group ID that can be retrieved from the Zotero.org user or group Feeds/API settingshttps://www.zotero.org/settings/keys. An authentication key (API_key) is required to access nonpublic Zotero libraries using the Zotero API. Authentication keys can also be generated in the Zotero.org user or group Feeds/API settingshttps://www.zotero.org/settings/keys.

If the requested reference collection is larger than 100 records, multiple API calls are initiated because the number of retrieved records is limited to 100 per API call. Frequent API calls will result in a temporary access block. Thus, there is an (currently unknown) upper limit to the length of reference collections that can be retrieved through this function. It is generally advisable to comment out the use of this function during periods in which the R Markdown file is frequently rebuilt to limit the number of API calls and limit the number of references to those needed for the current document by setting up collections in your Zotero library.

Collection keys (collection), i.e. identifiers of reference library subsets, can be retrieved by accessing them via a web browser. They keys are contained in the URL:

https://www.zotero.org/<USERNAME>/items/collectionKey/<COLLECTIONKEY>

Zotero web API calls can be slow, especially for large reference collections. If available, this function will utilize the downloader-package, which speeds up reference downloads considerably.

See Also

r_refs, cite_r

Examples

Run this code
# NOT RUN {
NULL
# }

Run the code above in your browser using DataLab