rgbif (version 3.7.9)

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


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
if (FALSE) {
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 DataLab