ApplicationStorage

Represents an application storage object to manipulate key-value pairs.

View as Markdown

Represents an application storage object to manipulate key-value pairs. Add the following line to your scenario code to use the class:

require(Modules.ApplicationStorage);

Functions

get

Retrieves a value of the specified key.

1get(key: string): Promise<StorageKey | null>

Parameters

key
stringRequired

keys

Retrieves all the keys assigned to a Voximplant application.

1keys(pattern?: string, count?: number): Promise<StoragePage>

Parameters

pattern
string
count
number

put

Creates a key-value pair. If an already existing key is passed, the method updates its value. The keys should be unique within a Voximplant application.

1put(key: string, value: string, ttl: number): Promise<StorageKey>

Parameters

key
stringRequired
value
stringRequired
ttl
numberRequired

remove

Removes the specified key. Note that the returned StorageKey always has zero ttl.

1remove(key: string): Promise<StorageKey>

Parameters

key
stringRequired