ВОЙТИ

ApplicationStorage

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

  • StorageKey

    Result of the get, put, and delete methods.

  • StoragePage

    Retrieves all the keys assigned to a Voximplant application.

  • delete

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

  • get

    Retrieves a value of the specified key.

  • keys

    Retrieves all the keys assigned to a Voximplant application.

  • put

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

functions

delete

delete(key: String): Promise

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

Parameters

  • key:

    String

    Key to delete.

Returns

  • Return:

    Promise

get

get(key: String): Promise

Retrieves a value of the specified key.

Parameters

  • key:

    String

    Key to get

Returns

  • Return:

    Promise

keys

keys(pattern: String): Promise

Retrieves all the keys assigned to a Voximplant application.

Parameters

  • pattern:

    String

    Return keys that begin with a pattern

Returns

  • Return:

    Promise

put

put(key: String, value: String, ttl: Number): Promise

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

Parameters

  • key:

    String

    Key to create/update

  • value:

    String

    Value for the specified key

  • ttl:

    Number

    Expiring time, seconds. The value is in range of 0..7,776,000 (90 days). Note that the pricing is tiered in three day-based pieces: 0-30, 31-60, 61-90. See the details here.

Returns

  • Return:

    Promise