DownReq: DownReq

Description Public fields Methods Examples

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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 documentation built on June 2, 2021, 9:07 a.m.