dvn (version 0.3.5)

dvDownloadInfo: Retrieve file download information

Description

Retrieve download information for a dataverse file.

Usage

dvDownloadInfo(fileid, dv = getOption('dvn'), browser = FALSE, ...)

Arguments

fileid
A character string specifying a dataverse fileId for a file contained in a dataverse record. This is distinct from the objectid that identifies the entire dataverse records.
dv
An optional character string specifying the Dataverse to query. Default is the Harvard IQSS Dataverse.
browser
A logical specifying whether the query should be executed in a web browser. Default is FALSE.
...
Optionally, additional arguments passed to getURL via dvQuery.

Value

A list containing details of the (potentially downloadable) file:
fileId
A character string containing the value of “fileid” from the original request.
fileName
A character string containing the name of the requested file.
fileMimeType
A character string containing the MIME type of the requested file.
fileSize
A character string containing the file size in bytes.
authMethod
A character string specifying the authentication method for the request
directAccess
A character string containing a logical for whether the file can be downloaded directly via the API.
accessRestrictions
A character string containing details on any file access restrictions.
accessServicesSupported
A dataframe detailing the available file formats for download.
xml
A character string containing the original API response in XML.
Note: access restrictions on files may prevent them from being downloaded directly in R.

See Also

dvDownload

Examples

Run this code
## Not run: 
# info <- dvDownloadInfo("9956")
# ## End(Not run)

Run the code above in your browser using DataLab