Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

DownReq

DownReq


Description

handles single requests for GbifQueue

Public fields

req

(list) internal holder for the request

type

(list) type, one of "lazy" (to be lazy evaluated) or "pre" (run with occ_download_exec internal fxn)

result

(list) holds the result of the http request

Methods

Public methods


Method new()

Create a new DownReq object

Usage
DownReq$new(x)
Arguments
x

either a lazy object with an object of class occ_download, or an object of class occ_download_prep

Returns

A new DownReq object


Method print()

print method for the DownReq class

Usage
DownReq$print(x, ...)
Arguments
x

self

...

ignored


Method run()

execute http request

Usage
DownReq$run()
Returns

nothing, puts the http response in $result


Method status()

check http request status

Usage
DownReq$status()
Returns

Method clone()

The objects of this class are cloneable with this method.

Usage
DownReq$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Not run: 
res <- DownReq$new(occ_download_prep(pred("basisOfRecord", "LITERATURE"), 
  pred("year", "1956")
))
res
# res$run()
# res
# res$status()
# res$result

## End(Not run)

rgbif

Interface to the Global 'Biodiversity' Information Facility API

v3.5.2
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>), Damiano Oldoni [aut] (<https://orcid.org/0000-0003-3445-7562>), Vijay Barve [ctb] (<https://orcid.org/0000-0002-4852-2567>), Peter Desmet [ctb] (<https://orcid.org/0000-0002-8442-8025>), Laurens Geffert [ctb], Dan Mcglinn [ctb] (<https://orcid.org/0000-0003-2359-3526>), Karthik Ram [ctb] (<https://orcid.org/0000-0002-0233-1757>), rOpenSci [fnd] (https://ropensci.org/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.