Skip to main content

LocationCloudStorageModule

Class

Provides access to location cloud storage depending upon the LocationCloudStorageOptions.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Since Lens Scripting v182

Index

Extends

Properties

name

name: string

The name of the Asset in Lens Studio.

Default Value

""

Inherited from

Asset.name


session

session: MultiplayerSession

SPECS

The active session used in the CloudStorageModule.

Since

Lens Scripting Version 182

Default Value

null
@snapOS

uniqueIdentifier

readonly uniqueIdentifier: string

Since

Lens Scripting Version 176

Inherited from

Asset.uniqueIdentifier

Methods

getNearbyLocationStores()

getNearbyLocationStores(options): void

Request discovery of LocationCloudStores based on the user location.

Parameters

ParameterType
optionsLocationCloudStorageOptions

Returns

void

Since

Lens Scripting Version 182


getTypeName()

static getTypeName(): TypeName<LocationCloudStorageModule>

Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

Returns

TypeName<LocationCloudStorageModule>

Since

Lens Scripting Version 182

Overrides

Asset.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

Asset.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object matches or derives from the passed in type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

Asset.isOfType


isSame()

isSame(other): boolean

Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

Asset.isSame


retrieveLocation()

retrieveLocation(persistedLocationId, onRetrievedLocation, onError): void

Retrieves the specified LocationAsset.

Parameters

ParameterType
persistedLocationIdstring
onRetrievedLocation(location) => void
onError(error) => void

Returns

void

Since

Lens Scripting Version 229


storeLocation()

storeLocation(location, onStoredLocation, onError): void

Stores the specified LocationAsset.

Parameters

ParameterType
locationLocationAsset
onStoredLocation(persistedLocationId) => void
onError(error) => void

Returns

void

Since

Lens Scripting Version 229