NAME
Echo::StreamServer::KVS - Key-Value Store API
SYNOPSIS
use Echo::StreamServer::Account;
use Echo::StreamServer::KVS;
my $acct = new Echo::StreamServer::Account($appkey, $secret);
my $client = new Echo::StreamServer::KVS($acct);
my %hash = ( 'a' => 'ok', 'b' => 1 );
$client->put('sample', \%hash);
my $sample_ref = $client->get('sample');
$client->delete('sample');
# Inspect KVS get reference to make PERL data.
if (ref($sample_ref) eq "ARRAY") {
@list = @{ $sample_ref };
}
if (ref($sample_ref) eq "HASH") {
%hash = %{ $sample_ref };
}
DESCRIPTION
The Key-Value Store API is Echo::StreamServer::KVS and requires an Echo::StreamServer::Account.
The store is a simple Key-Value database created to store the third-party widgets' arbitrary data elements permanently. Keys are arbitrary strings. Values are never interpreted by Echo. Each data element has public flag indicating if it is readable only by the owner or by everyone.
Each application key has its own independent store.
Client Methods
delete
-
Delete a data element by the
$key
. get
-
Fetch a data element by the
$key
. put
-
Save a data element to the store. The
$public
flag indicates that it is readable by everyone.
SEE ALSO
Echo::StreamServer::Account
AUTHOR
Andrew Droffner, <adroffne@advance.net>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Andrew Droffner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.