Class: DownloadsHelper

DownloadsHelper()

A helper type for resource download-related API endpoints.

Constructor

new DownloadsHelper()

Source:

Methods

(async) list(resourceId, sort) → {Array.<Download>}

List a page of downloads for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listAll(resourceId, sort) → {Array.<Download>}

List all pages of downloads for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByMember(resourceId, memberId, sort) → {Array.<Download>}

List a page of downloads by member for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
memberId number The identifier of the member.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByMemberAll(resourceId, memberId, sort) → {Array.<Download>}

List all pages of downloads by member for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
memberId number The identifier of the member.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByMemberUntil(resourceId, memberId, shouldContinue, sort) → {Array.<Download>}

List multiple pages of downloads by member for a given resource until a condition is no longer met.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
memberId number The identifier of the member.
shouldContinue function A function which determines if further pages are requested.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByVersion(resourceId, versionId, sort) → {Array.<Download>}

List a page of downloads by version for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
versionId number The identifier of the version.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByVersionAll(resourceId, versionId, sort) → {Array.<Download>}

List all pages of downloads by version for a given resource.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
versionId number The identifier of the version.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listByVersionUntil(resourceId, versionId, shouldContinue, sort) → {Array.<Download>}

List multiple pages of downloads by version for a given resource until a condition is no longer met.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
versionId number The identifier of the version.
shouldContinue function A function which determines if further pages are requested.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>

(async) listUntil(resourceId, shouldContinue, sort) → {Array.<Download>}

List multiple pages of downloads for a given resource until a condition is no longer met.
Parameters:
Name Type Description
resourceId number The identifier of the resource.
shouldContinue function A function which determines if further pages are requested.
sort SortOptions | undefined An optional set of sort options.
Source:
Returns:
An array of raw data objects.
Type
Array.<Download>