Skip to content

Latest commit

 

History

History
95 lines (60 loc) · 2.15 KB

collections.md

File metadata and controls

95 lines (60 loc) · 2.15 KB

CollectionsManager

List all collections

Retrieves all collections for a given user.

Currently, only the favorites collection is supported.

This operation is performed by calling function getCollections.

See the endpoint docs at API Reference.

await client.collections.getCollections();

Arguments

  • queryParams GetCollectionsQueryParams
    • Query parameters of getCollections method
  • headersInput GetCollectionsHeadersInput
    • Headers of getCollections method
  • cancellationToken undefined | CancellationToken
    • Token used for request cancellation.

Returns

This function returns a value of type Collections.

Returns all collections for the given user

List collection items

Retrieves the files and/or folders contained within this collection.

This operation is performed by calling function getCollectionItems.

See the endpoint docs at API Reference.

await client.collections.getCollectionItems(favouriteCollection.id!);

Arguments

  • collectionId string
    • The ID of the collection. Example: "926489"
  • optionalsInput GetCollectionItemsOptionalsInput

Returns

This function returns a value of type ItemsOffsetPaginated.

Returns an array of items in the collection.

Get collection by ID

Retrieves a collection by its ID.

This operation is performed by calling function getCollectionById.

See the endpoint docs at API Reference.

await client.collections.getCollectionById(collections.entries![0].id!);

Arguments

  • collectionId string
    • The ID of the collection. Example: "926489"
  • optionalsInput GetCollectionByIdOptionalsInput

Returns

This function returns a value of type Collection.

Returns an array of items in the collection.