Bundle Downloads

A BundleDownload is a record of the download action that happened in the bundle.

SDK Method

bundledownload.List()

Return Object

[]*BundleDownload

Authorization Requirement

Available to all authenticated keys or sessions.

BundleDownloadListParams Fields

FieldDescription
BundleId
int64
Bundle ID
BundleRegistrationId
int64
BundleRegistration ID

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    bundle_download "github.com/Files-com/files-sdk-go/v3/bundledownload"
)

bundleDownloadIterator, err := bundle_download.List(files_sdk.BundleDownloadListParams{BundleId: 1})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for bundleDownloadIterator.Next() {
    bundleDownload := bundleDownloadIterator.bundleDownload()
}
err = bundleDownloadIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The BundleDownload Object

Some of the methods above return a BundleDownload object. The attributes of this object are listed below.

AttributeDescription
BundleRegistration
BundleRegistration
DownloadMethod
string
Download method (file or full_zip)
Possible values: file, full_zip
Path
string
Download path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
WorkspaceId
int64
Workspace ID. 0 means the default workspace.
CreatedAt
date-time
Download date/time