Optional
dataOptional
Readonly
idOptional
interactiveOptional
isOptional
jwtOptional
textAdd a webhook to a dropped asset
await droppedAsset.addWebhook({
dataObject: {},
description: "Webhook desc",
enteredBy: "you",
isUniqueOnly: false,
title: "title",
type: "type",
url: "https://url.com",
});
Optional
shouldOptional
shouldDelete dropped asset.
await droppedAsset.deleteDroppedAsset();
Optional
error?: unknownOptional
message?: stringOptional
params?: objectOptional
sdkRetrieves platform asset details.
await asset.fetchAssetById();
const { assetName } = asset;
Retrieves the data object for a dropped asset.
const dataObject = await droppedAsset.fetchDataObject();
Retrieve analytics for a dropped asset by day, week, month, quarter, or year
const analytics = await droppedAsset.fetchDroppedAssetAnalytics({
periodType: "quarter",
dateValue: 3,
year: 2023,
});
Retrieves dropped asset details.
await droppedAsset.fetchDroppedAssetById();
const { assetName } = droppedAsset;
Flip an dropped asset.
await droppedAsset.flip(.5);
Increments a specific value in the data object for a dropped asset by the amount specified. Must have valid interactive credentials from a visitor in the world.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await droppedAsset.incrementDataObjectValue("key", 1);
Optional
analytics?: AnalyticType[]Optional
lock?: { Optional
releaseSets the data object for a dropped asset.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await droppedAsset.setDataObject({
"exampleKey": "exampleValue",
});
Optional
analytics?: AnalyticType[]Optional
lock?: { Optional
releaseSet the interactive settings on a dropped asset
await droppedAsset.setInteractiveSettings({
isInteractive: true,
interactivePublicKey: "xyz"
});
Optional
isUpdates platform asset details.
await asset.updateAsset({
assetName: "exampleAsset",
bottomLayerURL: null,
creatorTags: { "decorations": true },
isPublic: true,
shouldUploadImages: true,
tagJson: "[{"label":"decorations","value":"decorations"}]",
topLayerURL: "https://example.topLayerURL"
});
const { assetName } = asset;
Optional
bottomOptional
shouldOptional
topUpdates broadcast options for a dropped asset.
await droppedAsset.updateBroadcast({
assetBroadcast: true,
assetBroadcastAll: true,
broadcasterEmail: "example@email.com"
});
Updates click options for a dropped asset.
await droppedAsset.updateClickType({
"clickType": "portal",
"clickableLink": "https://topia.io",
"clickableLinkTitle": "My awesome link!",
"clickableDisplayTextDescription": "Description",
"clickableDisplayTextHeadline": "Title",
"position": {
"x": 0,
"y": 0
},
"portalName": "community"
});
Updates text and style of a dropped asset.
const style = {
"textColor": "#abc123",
"textFontFamily": "Arial",
"textSize": 40,
"textWeight": "normal",
"textWidth": 200
};
await droppedAsset.updateCustomTextAsset(style, "hello world");
Updates the data object for a dropped asset.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await droppedAsset.updateDataObject({
"exampleKey": "exampleValue",
});
Optional
analytics?: AnalyticType[]Optional
lock?: { Optional
releaseUpdates landmark zone options for a dropped asset.
await droppedAsset.updateLandmarkZone({
isLandmarkZoneEnabled: true,
landmarkZoneName: "Example",
landmarkZoneIsVisible: true,
});
Optional
landmarkOptional
landmarkUpdates media options for a dropped asset.
await droppedAsset.updateMediaType({
"mediaType": "link",
"mediaLink": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"isVideo": true,
"syncUserMedia": true,
"audioSliderVolume: 30"
"portalName": "community",
"audioRadius": 0,
"mediaName": "string"
});
Updates mute zone options for a dropped asset.
await droppedAsset.updateMuteZone(true);
Moves a dropped asset to specified coordinates.
await droppedAsset.updatePosition(100,200);
Optional
yOrderAdjust: numberUpdates private zone options for a dropped asset.
await droppedAsset.updatePrivateZone({
"isPrivateZone": false,
"isPrivateZoneChatDisabled": true,
"privateZoneUserCap": 10
});
Updates the size of a dropped asset.
await droppedAsset.assetScale(.5);
Change or remove media embedded in a dropped asset.
await droppedAsset.updateUploadedMediaSelected("LVWyxwNxI96eLjnXWwYO");
Change or remove top and bottom layers of a dropped asset.
await droppedAsset.updateWebImageLayers("","https://www.shutterstock.com/image-vector/colorful-illustration-test-word-260nw-1438324490.jpg");
Updates webhook zone options for a dropped asset.
await droppedAsset.updateWebhookZone(true);
Summary
Create an instance of Dropped Asset class with a given dropped asset id, url slug, and optional attributes and session credentials.
Usage