forked from rladies/meetupr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
93 lines (62 loc) · 2.96 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit the Rmd file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
# devtools::install_github("hadley/emo")
```
# meetupr
[![Build Status](https://travis-ci.org/rladies/meetupr.svg?branch=master)](https://travis-ci.org/rladies/meetupr)
R interface to the Meetup API (v3)
**Authors:** [Gabriela de Queiroz](http://gdequeiroz.github.io/), [Erin LeDell](http://www.stat.berkeley.edu/~ledell/), [Olga Mierzwa-Sulima](https://github.com/olgamie), [Lucy D'Agostino McGowan](http://www.lucymcgowan.com), [Claudia Vitolo](https://github.com/cvitolo)<br/> [MIT](https://opensource.org/licenses/MIT)
**License:** [MIT](https://opensource.org/licenses/MIT)
## Installation
To install the development version from GitHub:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("rladies/meetupr")
```
A released version will be on CRAN soon.
## Usage
To use this package, you will first need to get your meetup API key. To do so, go to this link: [https://secure.meetup.com/meetup_api/key/](https://secure.meetup.com/meetup_api/key/)
Once you have your key, save it as an environment variable for the current session by running the following:
```{r, eval = FALSE}
Sys.setenv(MEETUP_KEY = "PASTE YOUR MEETUP KEY HERE")
```
Alternatively, you can set it permanently with the help of `usethis::edit_r_environ()` by adding the line to your `.Renviron`:
```
MEETUP_KEY=PASTE YOUR MEETUP KEY HERE
```
If you don't want to save it here, you can input it in each function using the `api_key` parameter (just be sure not to send any documents with your key to GitHub `r emo::ji("speak_no_evil")`).
We currently have the following functions:
* `get_members()`
* `get_boards()`
* `get_events()`
* `get_event_attendees()`
* `get_event_comments()`
* `get_event_rsvps()`
* `find_groups()`
Each will output a tibble with information extracted into from the API as well as a `list-col` named `*_resource` with all API output. For example, the following code will get all upcoming events for the [R-Ladies San Francisco](https://meetup.com/rladies-san-francisco) meetup.
```{r}
library(meetupr)
urlname <- "rladies-san-francisco"
events <- get_events(urlname, "past")
dplyr::arrange(events, desc(created))
```
## How can you contribute?
Take a look at some resources:
- [https://www.meetup.com/meetup_api/](https://www.meetup.com/meetup_api/)
- [https://www.meetup.com/meetup_api/clients/](https://www.meetup.com/meetup_api/clients/)
In order to run our tests, you will have to set the `urlname` for meetup you belong to as an environment variable using the following code:
```{r, eval = FALSE}
Sys.setenv(MEETUP_NAME = "YOUR MEETUP NAME")
```
### TODO:
- add tests
--
Please note that the 'meetupr' project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.