rgbif (version 3.3.0)

DownReq: DownReq

Description

handles single requests for GbifQueue

Arguments

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

output of occ_download_meta()

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

Run this code
# NOT RUN {
res <- DownReq$new(occ_download_prep(pred("basisOfRecord", "LITERATURE"), 
  pred("year", "1956")
))
res
# res$run()
# res
# res$status()
# res$result
# }

Run the code above in your browser using DataCamp Workspace