Retrieves the data object for a Topia ecosystem. Requires canUpdateEcosystemDataObjects permission to be set to true for the public key.
Optional
appPublicKey: stringOptional
appJWT: stringReturns the data object or an error response.
Increments a specific value in the data object for a Topia ecosystem by the amount specified. Must have valid interactive credentials from a visitor in the world.
This method also allows you to increment a data object value on behalf of another Public Key. It requires canUpdateEcosystemDataObjects
permission to be set to true for the Public Key.
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
Sets the data object for a Topia ecosystem.
This method also allows you to set a data object on behalf of another Public Key. It requires canUpdateEcosystemDataObjects
permission to be set to true for the Public Key.
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
Updates the data object for a Topia ecosystem.
This method also allows you to update a data object on behalf of another Public Key. It requires canUpdateEcosystemDataObjects
permission to be set to true for the Public Key.
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 ecosystem.updateDataObject({
[`profiles.${profileId}.itemsCollectedByUser`]: { [dateKey]: { count: 1 }, total: 1 },
[`profileMapper.${profileId}`]: username,
}, {
sharedAppPublicKey: "exampleAppPublicKey",
sharedAppJWT: "exampleAppPublicKeyJWT",
analytics: [{ analyticName: "itemCollected", profileId, uniqueKey: profileId, urlSlug } ],
lock: { lockId: `${assetId}-${resetCount}-${new Date(Math.round(new Date().getTime() / 10000) * 10000)}` },
}
});
const { exampleKey } = ecosystem.dataObject;
Optional
dataOptional
jwt
Create an instance of Ecosystem class with optional session credentials
Example