Skip to content

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

Class: MediasMetadataClient

This class provides access to methods concerning metadata of medias.

Hierarchy

  • AbstractClient

MediasMetadataClient

Table of contents

Methods

Methods

listMediaDocumentMetadata

listMediaDocumentMetadata(libraryId, mediaId, documentId): Promise<IPublicMediaMetadataEntryQuery>

Parameters

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

Returns

Promise<IPublicMediaMetadataEntryQuery>

Promise object representing the metadata of a media document.

Summary

Retrieve the metadata of a media document.

Example

const result = await client.medias.metadata.getMediaDocumentMetadata("library_id", "media_id", "document_id");
const mediaDocumentMetadata = result.$resources;

listMediaMetadata

listMediaMetadata(libraryId, mediaId): Promise<IPublicMediaMetadataEntryQuery>

Parameters

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

Returns

Promise<IPublicMediaMetadataEntryQuery>

Promise object representing the metadata of a media.

Summary

Retrieve the metadata of a media.

Example

const result = await client.medias.metadata.listMediaMetadata("library_id", "media_id");
const mediaMetadata = result.$resources;

setMediaDocumentMetadata

setMediaDocumentMetadata(libraryId, mediaId, documentId, updateParameter): Promise<void>

Parameters

Name Type Description
libraryId string The uuid of the targeted library.
mediaId string The uuid of the targeted media.
documentId string The uuid of the targeted document.
updateParameter IPublicUpdateMetadataForm The news metadata.

Returns

Promise<void>

Summary

Update the metadata of a media document.

Example

const updateMetadataForm: IPublicUpdateMetadataForm = {
   "metadata": [
        {
            "metadataName": "meta_name",
            "metadataValue": "meta_value"
        }
    ]
}
await client.medias.metadata.setMediaDocumentMetadata("library_id", "media_id", "document_id", updateMetadataForm);