ZenodoRequest {zen4R} | R Documentation |
ZenodoRequest
Description
ZenodoRequest
ZenodoRequest
Format
R6Class
object.
Value
Object of R6Class
for modelling a generic Zenodo request
Super class
zen4R::zen4RLogger
-> ZenodoRequest
Methods
Public methods
Inherited methods
Method new()
Initializes a ZenodoRequest
Usage
ZenodoRequest$new( url, type, request, data = NULL, file = NULL, progress = FALSE, accept = "application/vnd.inveniordm.v1+json", token, logger = NULL, ... )
Arguments
url
request URL
type
Type of request: 'GET', 'POST', 'PUT', 'DELETE'
request
the method request
data
payload (optional)
file
to be uploaded (optional)
progress
whether a progress status has to be displayed for download/upload
accept
accept header. Default is "application/vnd.inveniordm.v1+json"
token
user token
logger
the logger type
...
any other arg
Method execute()
Executes the request
Usage
ZenodoRequest$execute()
Method getRequest()
Get request
Usage
ZenodoRequest$getRequest()
Method getRequestHeaders()
Get request headers
Usage
ZenodoRequest$getRequestHeaders()
Method getStatus()
Get request status
Usage
ZenodoRequest$getStatus()
Method getResponse()
Get request response
Usage
ZenodoRequest$getResponse()
Method getException()
Get request exception
Usage
ZenodoRequest$getException()
Method getResult()
Get request result
Usage
ZenodoRequest$getResult()
Method setResult()
Set request result
Usage
ZenodoRequest$setResult(result)
Arguments
result
result to be set
Method clone()
The objects of this class are cloneable with this method.
Usage
ZenodoRequest$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Note
Abstract class used internally by zen4R
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>