Echo::StreamServer::KVS - Key-Value Store API
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 }; }
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.
delete
Delete a data element by the $key.
$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.
$public
Echo::StreamServer::Account
Andrew Droffner, <adroffne@advance.net>
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.
To install Echo::StreamServer::KVS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Echo::StreamServer::KVS
CPAN shell
perl -MCPAN -e shell install Echo::StreamServer::KVS
For more information on module installation, please visit the detailed CPAN module installation guide.