Skip to main content

LensStudio:AssetLibrary.GetAssetsByIdsRequest

Class

Request object for fetching specific assets by their unique identifiers.

Index

Example

// GetAssetsByIdsRequest fetches specific assets by their IDs.
// Constructor: new GetAssetsByIdsRequest(environmentSetting, assetIds)
//
// Properties (all readonly):
// assetIds: string[] — the IDs to look up
// environmentSetting: EnvironmentSetting — backend environment config

const envSetting = new EnvironmentSetting();
envSetting.environment = Environment.Production;
envSetting.space = Space.Public;

const ids = ['asset-id-aaa', 'asset-id-bbb'];
const request = new GetAssetsByIdsRequest(envSetting, ids);

console.log('GetAssetsByIdsRequest created');
console.log(' assetIds:', request.assetIds);
console.log(' environment:', request.environmentSetting.environment);

Constructors

Constructor

new GetAssetsByIdsRequest(environmentSetting, assetIds): GetAssetsByIdsRequest

Constructs a new GetAssetsByIdsRequest for fetching assets by their IDs from the Asset Library.

Parameters

ParameterType
environmentSettingEnvironmentSetting
assetIdsstring[]

Returns

GetAssetsByIdsRequest

Properties

assetIds

readonly assetIds: string[]

Array of asset ID strings to retrieve.


environmentSetting

readonly environmentSetting: EnvironmentSetting

Environment setting that determines which backend environment to query.