-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.qmd
More file actions
64 lines (50 loc) · 1.27 KB
/
Copy pathusers.qmd
File metadata and controls
64 lines (50 loc) · 1.27 KB
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
---
title: "Users"
format: html
---
## About
This page documents the results of testing functions that involve *users*.
::: {.callout-important}
These functions are intended to access only *public* data.
:::
## Setup
```{r}
#| label: "login to Databrary"
library(databraryr)
login_db(email = Sys.getenv("DATABRARY_LOGIN"),
password = Sys.getenv("DATABRARY_PASSWORD"),
client_id = Sys.getenv("DATABRARY_CLIENT_ID"),
client_secret = Sys.getenv("DATABRARY_CLIENT_SECRET"),
store = FALSE,
overwrite = FALSE,
vb = TRUE)
```
## `*_user_*` functions
```{r}
#| label: "test _user* functions"
get_user_avatar(user_id = 6,
dest_path = "rog.png",
vb = TRUE)
get_user_by_id(user_id = 6,
vb = TRUE)
list_user_affiliates(user_id = 6,
vb = TRUE)
list_user_sponsors(user_id = 6,
vb = TRUE)
list_user_volumes(user_id = 6,
vb = TRUE)
list_users(search = "Gilmore",
vb = TRUE)
search_users(search_string = "Gilmore", vb = TRUE)
```
This is very slow, so we do not run it by default.
```{r}
#| label: "test slow function"
#| eval: false
list_user_history(user_id = 6,
vb = TRUE)
```
## Clean-up
```{r}
logout_db()
```