get: Query an endpoint and cache the data

Description Usage Arguments Value Examples

Description

Query an endpoint and cache the data

Usage

 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
get_text(.endpoint, ..., .cache = NULL, .parser = identity,
  .quiet = FALSE, .encoding = NULL)

get_textf(.endpoint, ...)

get_raw(.endpoint, ..., .cache = NULL, .parser = identity, .quiet = FALSE)

get_rawf(.endpoint, ...)

get_text_(endpoint, params = list(), cache = NULL, parser = identity,
  quiet = FALSE, encoding = NULL, ...)

get_text_f(endpoint, ...)

get_raw_(endpoint, params = list(), cache = NULL, parser = identity,
  quiet = FALSE, ...)

get_raw_f(endpoint, ...)

get_download(.endpoint, ..., .cache = NULL, .parser = identity,
  .quiet = FALSE)

get_downloadf(.endpoint, ...)

get_download_(endpoint, params = list(), cache = NULL, parser = identity,
  quiet = FALSE, ...)

get_download_f(endpoint, ...)

Arguments

..., params

Key/value pairs to send to the query (non url-encoded)

endpoint, .endpoint

The URL endpoint to send the query

cache, .cache

An environment, directory name, NULL (disable cache), or NA for internal cache

parser, .parser

A function that the (character) results will be passed through

quiet, .quiet

Use quiet=TRUE to supress messaging

encoding, .encoding

The encoding to use (defaults to auto, see httr::content)

Value

The result of parser on the text resulting from the call

Examples

1
2
3
# that's some catch, that catch-22:
get_text("https://www.goodreads.com/book/title",
         key="HSkIMuOGlxFIOmfBCGFVA", title='catch-22')

paleolimbot/resteasy documentation built on May 24, 2019, 6:13 p.m.