api_write: Write helper

Description Usage Arguments Examples

View source: R/api_write.R

Description

Write helper

Usage

1
api_write(.data, file, overwrite = FALSE, ...)

Arguments

.data

Result of a call to api

file

(character) Full file path to write to

overwrite

(logical) Will only overwrite existing path if TRUE

...

ignored for now

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## write to disk
ff <- tempfile(fileext = ".json")
api('https://api.github.com/') %>%
  api_path(repos, ropensci, rgbif, issues) %>%
  api_write(ff)
jsonlite::fromJSON(ff)

## End(Not run)

sckott/request documentation built on Sept. 5, 2017, 7:22 p.m.