-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
74 lines (50 loc) · 1.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# zoter: Zotero API in R
<!-- badges: start -->
<!-- badges: end -->
The goal of {zoter} is to conveniently access the Zotero API v3 from R.
## Installation
You can install the development version of **{zoter}** like so:
``` r
# install.packages("devtools")
devtools::install_github("kleinlennart/zoter")
```
## Usage
### Authentication
To access your own private library you will need your **userID** (not your username!) and an **API Key**.\
You can find them here: [https://www.zotero.org/settings/keys](https://www.zotero.org/settings/keys/new)
```{r auth, eval=FALSE}
library(zoter)
## Will ask you for your userID and API Key
set_zotero_creds()
## Alternatively you can also set them directly with:
Sys.setenv("ZOTERO_API_USER" = "XXXXX")
Sys.setenv("ZOTERO_API_KEY" = "XXXXX")
```
### Example API Calls
```{r example, eval=FALSE}
## Download and parse infos for all top-level items in your library
items <- get_all_items_top()
## Download and parse infos for all collections in your library
colls <- get_all_collections()
## Use 'req_zotero' for more specific queries
trash_keys <- req_zotero(query = "items/trash", output = "raw", format = "keys")
```
### Cleaning
```{r cleaning, eval=FALSE}
```
### Analysis
```{r analysis, eval=FALSE}
# Plots
```