calls: Calls

Description Usage Arguments Note Examples

Description

All of The Guardian API endpoints.

Usage

1
2
3
4
5
6
7
8
9
gd_search(q = NULL, ..., pages = 1)

gd_tags(q = NULL, ..., pages = 1)

gd_sections(q = NULL, ..., pages = 1)

gd_editions(q = NULL, ..., pages = 1)

gd_items(items, ...)

Arguments

q

The search query parameter supports AND, OR and NOT operators.

...

Any other parameter, or filter, see the full list at https://open-platform.theguardian.com/documentation/.

pages

Number of pages to collect.

items

Vector of API links to items.

Note

This only "prepares" the API calls, use gd_call to execute them.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
(to_search <- gd_search("debates", pages = 13))
results <- gd_call(to_search)

# select items to retrieve
items_to_get <- gd_items(results$apiUrl[1:13])
items <- gd_call(items_to_get)

## End(Not run)

news-r/guardian documentation built on July 16, 2019, 3:25 a.m.