Skip to content

@ubstream/ubstream-node-client-sdk / Exports / LibrariesTrashClient

Class: LibrariesTrashClient

This class provides access to methods to manage medias in collection trash of a library.

Hierarchy

  • AbstractClient

LibrariesTrashClient

Table of contents

Methods

Methods

listDeletedMedias

listDeletedMedias(libraryId): Promise<IPublicLibraryMediaRefQuery>

Parameters

Name Type Description
libraryId string The uuid of the targeted library.

Returns

Promise<IPublicLibraryMediaRefQuery>

Promise object representing all trashed medias.

Summary

Retrieve all library's trashed medias.

Example

const result = await client.libraries.trash.listDeletedMedias("library_id");
const deletedMedias = result.$resources;

thrashMedia

thrashMedia(libraryId, mediaId): Promise<void>

Parameters

Name Type Description
libraryId string The uuid of the targeted library.
mediaId string The uuid of the targeted media.

Returns

Promise<void>

Summary

Move a media to the library's trash.

Example

await client.libraries.trash.thrashMedia("library_id", "media_id");

// The media can be removed from trash with the method attachMediaToCollection of the LibrariesCollectionsMediasClient.
await client.libraries.collections.medias.attachMediaToCollection("library_id", "collection_id", "media_id");