Skip to main content

LensStudio:AssetLibrary

Module

The LensStudio:AssetLibrary module for Lens Studio plugins.

Before using anything in this namespace, make sure to import LensStudio:AssetLibrary.

Example

// The LensStudio:AssetLibrary module provides access to the online asset library.
const AssetLibrary = await import('LensStudio:AssetLibrary');
const provider = this.pluginSystem.findInterface(
AssetLibrary.IAssetLibraryProvider.interfaceId
) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;

// Access the three services on the provider
const assetService = provider.assetService;
const assetsByIdsService = provider.assetsByIdsService;
const musicService = provider.musicService;
console.log('AssetLibrary services available:',
!Editor.isNull(assetService), !Editor.isNull(assetsByIdsService), !Editor.isNull(musicService));

Enumerations

EnumerationDescription
AssetTypeThe types of assets that might be provided by the "LensStudio:AssetLibrary".
EnvironmentThe Asset Library environment which assets should be searched within. In most cases Production should be used. Used with "LensStudio:AssetLibrary".EnvironmentSetting.
PlatformEnum representing the target platform associated with an asset.
SpaceThe Asset Library space which assets should be searched within. In most cases Public should be used. Used with "LensStudio:AssetLibrary".EnvironmentSetting.

Classes

ClassDescription
AssetA handle for an asset from the Asset Library.
AssetFilterA filter used to narrow down an AssetListRequest.
AssetListRequestA request object for finding assets in the Asset Library.
AssetListResponseA handle returned by the "LensStudio:AssetLibrary".AssetListService.
AssetListServiceA handle to the "LensStudio:AssetLibrary".AssetListService which can provide a list of assets based on the passed in parameters.
AssetListSuccessThe result of a fetch call by the "LensStudio:AssetLibrary".AssetListService, which provides you a list of matching assets in the Asset Library.
CreatorInformation about the creator or author of an Asset Library asset.
EnvironmentSettingA configuration object that describes what Asset Library environment should be accessed.
GetAssetsByIdsRequestRequest object for fetching specific assets by their unique identifiers.
GetAssetsByIdsResponseResponse returned when fetching assets by IDs, containing matched assets or an error.
GetAssetsByIdsServiceService interface for submitting get-assets-by-IDs requests.
IAssetLibraryProviderA handle that provides access to the AssetLibraryListService.
LicensedMusicProvides access to licensed music import functionality for adding music assets to a project.
MusicAssetHandle for a music asset from the Asset Library.
MusicListResponseResponse returned from a music list query, containing either a success result or a service error.
MusicListServiceService interface for submitting and managing music list requests.
MusicListSuccessSuccessful result of a music list request, containing the returned music assets.
PaginationConfiguration for the page to be accessed in a "LensStudio:AssetLibrary".AssetFilter.
ResourceThe actual resources of an "LensStudio:AssetLibrary".Asset.
ServiceErrorThe callback of an errored fetch call by the "LensStudio:AssetLibrary".AssetListService.
SubcategoryTag or classification used to further categorize an asset within its primary asset type.