LensStudio:AssetLibrary.Creator
ClassInformation about the creator or author of an Asset Library asset.
Index
Properties
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
readonlydisplayName:string
Display name of the creator.
officialLensCreator
readonlyofficialLensCreator:boolean
Whether the creator is an official Lens creator.
profileUrl
readonlyprofileUrl:string
URL to the creator's profile page.