DataProductFile-class {onc.api}R Documentation

DataProductFile class

Description

Encapsulates the download of a single data product file, and the handling of the server polling and error codes.

Arguments

dpRunId

Run Id of a data product request that was run

index

Index of this object's file

baseUrl

From the Onc class

token

From the Onc class Downloads this data product file

Can poll, wait and retry if the file is not ready to download

overwrite

When TRUE, existing files will be overwritten, otherwise they are skipped

timeout, pollPeriod, outPath, maxRetries

Same as in the Onc class

response

The successful (200) httr response obtained from a download request

Value

(integer) the final response's HTTP status code Return the file name from the response

(string) The filename as obtained from the headers Return information on this download's outcome

(list) A named list with information on the download result Sets this object's status to 200 (complete) Used by onc_delivery methods

Fields

.filters

The list of filters to pass to the download API method

.retries

Total count of HTTP requests made by this object

.status

Last request's HTTP status code

.downloaded

TRUE if the file was downloaded from the API

.baseUrl

Same as in the Onc class

.downloadUrl

URL that downloads this file

.fileName

Filename of the file if downloaded & saved

.fileSize

Size in bytes of the file if downloaded & saved

.runningTime

Total time spent running (sec)

.downloadingTime

Total time spend downloading (sec) Class initializer


[Package onc.api version 2.0.1.0 Index]