Realtime Cloud Storage

Storage

namespace Storage

Provides access to the Realtime Storage API.

Classes

ItemRef

Class with the definition of an item reference.

ItemSnapshot

Class with the definition of an item snapshot.

StorageRef

Class with the definition of a storage reference.

TableRef

Class with the definition of a table reference.

TableSnapshot

Class with the definition of a table snapshot.

Methods

StorageRef create(Object args, [function(StorageRef storageRef) success], [function(String message) error])

Creates a new Storage reference.

Parameters

Object args

Structure with the necessary arguments to create a storage reference.

Properties

String applicationKey

Public key of the application's license.

String authenticationToken

An authenticated token.

Boolean isSecure optional

Defines if the requests and notifications are under a secure connection. Defaults to true.

Boolean isCluster optional

Defines if the specified url is from a cluster server. Defaults to true.

String url optional

The url of the storage server. Defaults to "storage.realtime.co".

Function onReconnect optional

Function to run every time the notification system recovers from a disconnect.

Function onReconnecting optional

Function to run every time the notification system tries to reconnect.

function(StorageRef storageRef) success optional

Response from the server when the request was completed successfully.

Arguments

StorageRef storageRef

The resulting storage reference from the executed operation.

function(String message) error optional

Response if client side validation failed or if an error was returned from the server.

Arguments

String message

The message detailing the error.

Sample

// Create a storage reference.
var storageRef = Realtime.Storage.create({
	applicationKey: "myApplicationKey",
	authenticationToken: "myAuthenticationToken"
});

Properties

Boolean debug

If set, displays internal error messages.

Objects

ProvisionLoad

Provides access to the available provision load definitions.

Properties

Number Balanced

Id of the Balanced provision load (Assign similar read an write capacity).

Number Custom

Id of the Custom provision load.

Number Read

Id of the Read provision load (Assign more read capacity than write capacity).

Number Write

Id of the Write provision load (Assign more write capacity than read capacity).

ProvisionType

Provides access to the available provision types.

Properties

Number Custom

Id of the Custom provision type (customized read and write throughput).

Number Heavy

Id of the Heavy provision type (200 operations per second).

Number Intermediate

Id of the Intermediate provision type (100 operations per second).

Number Light

Id of the Light provision type (26 operations per second).

Number Medium

Id of the Medium provision type (50 operations per second).