Class: StorageClient

Storage Client


The Storage client handles saving and retrieving data for your application.

TODO
  • add clear method

Methods

delete
(params)

clients/storageClient.js, line 100

Delete a value from storage.

Name Type Description
params Object

Params object

Name Type Description
key String

The key to get from storage

storageType String optional

The type of storage to use

Example
StorageClient.delete({key:"testKey"})

get
(params, cb)

clients/storageClient.js, line 63

Get a value from storage.

Name Type Description
params Object

Params object

Name Type Description
key String

The key to get from storage

storageType String optional

The type of storage to use

cb function optional

callback to be called on success

Example
StorageClient.get({key:"testKey"}, function(data){
	var myData = data;
});

save
(params, cb)

clients/storageClient.js, line 41

Save a key value pair into storage.

Name Type Description
params Object

Params object

Name Type Description
name String

The key to be stored

data Param

The value to be stored

storageType String optional

The type of storage to use

cb function optional

callback to be called on success

Example
StorageClient.save({name:"testKey",data:"testValue"})