dvDownloadInfo: Retrieve file download information

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dvDownloadInfo.r

Description

Retrieve download information for a dataverse file.

Usage

1
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.

Author(s)

Thomas J. Leeper

See Also

dvDownload

Examples

1
2
3
4
## Not run: 
info <- dvDownloadInfo("9956")

## End(Not run)

dvn documentation built on May 29, 2017, 5:53 p.m.