Created
October 2, 2017 22:01
-
-
Save crsh/eb64a61a1b42c782ef5e7e8385a05db2 to your computer and use it in GitHub Desktop.
Working example of fetch_zotero_refs()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The ID of a Zotero user or group can be found via Zotero.org. E.g. the public group "PSYCH 490 ARTICLES" | |
# can be found at https://www.zotero.org/groups/1738107/psych_490_articles/items. The URL contains the group ID 1738107. | |
# To access the group via the Zotero API you need an account and an API key. API keys can be created and accessed | |
# at https://www.zotero.org/settings/keys when you are logged into your user account. | |
# | |
# As of the current development version fetch_zotero_refs() has not been exported (to be honest, I don't know why). | |
# Hence, the papaja:::-prefix is required. | |
papaja:::fetch_zotero_refs( | |
x = "1738107" | |
, bib_name = "psych490.bib" | |
, API_key = "insert_your_API_key_here" | |
, lib_type = "group" | |
) | |
# For a slightly more involved example consider the public group "Psychiatrie perinatale" | |
# (https://www.zotero.org/groups/79334/psychiatrie_perinatale/items), which has seven collections. To download the | |
# references from a specific collection you need the collection ID. The URL of the desired collection | |
# "6. Rapports/Nouvelles" (https://www.zotero.org/groups/79334/psychiatrie_perinatale/items/collectionKey/J6ZNSQE9) | |
# again contains the group (79334) but also the collection ID (J6ZNSQE9). | |
papaja:::fetch_zotero_refs( | |
x = "79334" | |
, bib_name = "perinatale.bib" | |
, API_key = "insert_your_API_key_here" | |
, lib_type = "group" | |
, collection = "J6ZNSQE9" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment