Pular para o conteúdo principal

externalMediaSelector

A Selector that provide methods to list and request information on MediaObjects.

You can use a MediaSelector by accessing StarlightClient.media.

Index

Methods

Methods

externalget

  • Returns a StarlightItemResponse with a single MediaObject.

    Note: MediaObjects are identified by their IDs, since they don’t have slugs.

    @example

    Requesting information from a media object of id “123456789”.

    import Starlight from '@starlightcms/js-sdk'

    const response = await Starlight.media.get('123456789')

    Parameters

    • externalid: string | number

      The media object ID.

    Returns Promise<StarlightItemResponse<MediaObject>>

externallist