-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
43 lines (30 loc) · 957 Bytes
/
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
---
output:
github_document:
html_preview: false
---
<!-- badges: start -->
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/news-r/currents?branch=master&svg=true)](https://ci.appveyor.com/project/news-r/currents)
[![Build Status](https://travis-ci.org/news-r/currents.svg?branch=master)](https://travis-ci.org/news-r/currents)
<!-- badges: end -->
# currents
Integrates the [currents API](https://currentsapi.services/) with R.
## Installation
``` r
# install.packages("remotes")
remotes::install_github("news-r/currents")
```
## Example
Specify you API key with `currents_key` or put it in your `.Renviron` as `CURRENTS_API_KEY`.
```r
library(currents)
currents_key("xXxxXXXxXXxXxx")
```
Then use `cur_latest` or `cur_search`.
```{r}
currents::cur_search(keyword = "Donald Trump", language = "en")
```
You can also filter results by region, country or language.
```{r}
currents::cur_avail_categories()
```