Skip to main content

LensStudio:AssetLibrary.Creator

Class

Information about the creator or author of an Asset Library asset.

Index

Example

// Creator holds metadata about an Asset Library asset's author.
// Read it from Asset.creator after fetching assets.
const provider = this.pluginSystem.findInterface(
IAssetLibraryProvider.interfaceId
) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;

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

const filter = new AssetFilter();
filter.searchText = 'bitmoji';

const response = await provider.assetService.fetchAsync(
new AssetListRequest(envSetting, filter)
);

if (response.ok && response.data) {
for (const asset of response.data.assets) {
if (asset.creator) {
console.log(asset.assetName, 'by', asset.creator.displayName,
'(official:', asset.creator.officialLensCreator + ')',
asset.creator.profileUrl);
}
}
}

Properties

displayName

readonly displayName: string

Display name of the creator.


officialLensCreator

readonly officialLensCreator: boolean

Whether the creator is an official Lens creator.


profileUrl

readonly profileUrl: string

URL to the creator's profile page.