Permalink
Browse files

small POD update

  • Loading branch information...
1 parent 101c866 commit 4a6bb24ac6d748ffc43c9a1149fe7ea8f995390f @fcuny fcuny committed Apr 11, 2010
Showing with 8 additions and 14 deletions.
  1. +8 −14 lib/AnyEvent/Riak.pm
View
@@ -224,24 +224,18 @@ AnyEvent::Riak - Non-blocking Riak client
=head1 SYNOPSIS
- use AnyEvent::Riak;
+ use AnyEvent::Riak;
- my $riak = AnyEvent::Riak->new(
- host => 'http://127.0.0.1:8098',
- path => 'riak',
- );
+ my $riak = AnyEvent::Riak->new(
+ host => 'http://127.0.0.1:8098',
+ path => 'riak',
+ );
+
+ die "Riak is not running" unless $riak->is_alive->recv;
- if ( $riak->is_alive->recv ) {
my $buckets = $riak->list_bucket('bucketname')->recv;
my $new_bucket
- = $riak->set_bucket( 'foo', { allowed_fields => '*' } )->recv;
- my $store
- = $riak->store(
- { bucket => 'foo', key => 'bar', object => { baz => 1 }, link => [] }
- )->recv;
- my $fetch = $riak->fetch( 'foo', 'bar' )->recv;
- my $delete = $riak->delete( 'foo', 'bar' )->recv;
- }
+ = $riak->set_bucket( 'foo', { props => { n_val => 2 } } )->recv;
For a complete description of the Riak REST API, please refer to
L<https://wiki.basho.com/display/RIAK/REST+API>.

0 comments on commit 4a6bb24

Please sign in to comment.