Optional
dataOptional
jwtOptional
profileOptional
profileVerify user has valid interactive credentials
await user.checkInteractiveCredentials();
Optional
error?: unknownOptional
message?: stringOptional
params?: objectOptional
sdkRetrieves all worlds a user with matching API Key is an admin in, creates a new World object for each, and creates new map of Worlds accessible via user.adminWorlds.
await user.fetchAdminWorldsByKey();
const adminWorlds = user.adminWorlds;
Returns all assets owned by User when an email address is provided.
await user.fetchAssets();
const userAssets = user.assets;
Retrieves the data object for a user.
const dataObject = await user.fetchDataObject();
Retrieves ids of all dropped assets in all worlds with a matching interactivePublicKey.
await user.fetchInteractiveWorldsByKey("interactivePublicKeyExample");
const interactiveWorlds = user.interactiveWorlds;
Returns all platform assets.
const assets = await user.fetchPlatformAssets();
Returns all scenes owned by User.
await user.fetchScenes();
const userScenes = user.scenes;
Retrieves all worlds owned by user with matching API Key, creates a new World object for each, and creates new map of Worlds accessible via user.worlds.
await user.fetchWorldsByKey();
const userWorlds = user.worlds;
{ urlSlug: new World({ apiKey, worldArgs, urlSlug }) }
Increments a specific value in the data object for a user 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 user.incrementDataObjectValue(
"path": "key",
"amount": 1,
);
Optional
analytics?: string[]Optional
lock?: { Optional
releaseSets the data object for a user.
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 user.setDataObject({
"exampleKey": "exampleValue",
});
Optional
analytics?: string[]Optional
lock?: { Optional
releaseUpdates the data object for a user.
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 user.updateDataObject({
"exampleKey": "exampleValue",
});
Optional
analytics?: string[]Optional
lock?: { Optional
release
Summary
Create an instance of User class with optional session credentials.
Usage