Skip to contents

Read data package archive

Usage

read_data_package_archive(packageId, transaction, path, env = "production")

Arguments

packageId

(character) Data package identifier

transaction

(character) Transaction identifier

path

(character) Path of directory in which the result will be written

env

(character) Repository environment. Can be: "production", "staging", or "development".

Value

(.zip file) The data package archive of packageId requested by transaction

Examples

if (FALSE) {

# Create zip archive
packageId <- "knb-lter-sev.31999.1"
transaction <- create_data_package_archive(packageId)
transaction
#> [1] "archive_knb-lter-sev.31999.1_16396683904724129"

# Check creation status
read_data_package_error(transaction)

# Download zip archive
read_data_package_archive(packageId, transaction, path = tempdir())
#> |=============================================================| 100%
dir(tempdir())
#> [1] "knb-lter-sev.31999.1.zip"
}