summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-01 17:04:29 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-01 17:04:29 +0100
commit9d61777d28cbac9e0309acb1967f04e1fc5fc846 (patch)
tree140675ce8d6bfdbe1b4689fb6d5018755755e84c /lib
parentadd fallback (diff)
downloadnet-http-spore-9d61777d28cbac9e0309acb1967f04e1fc5fc846.tar.gz
update synopsis
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm b/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
index 3fb5bf0..524205d 100644
--- a/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
+++ b/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
@@ -44,6 +44,9 @@ sub call {
 =head1 SYNOPSIS
 
     my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
+
+    $client->enable('Format::JSON');
+
     $client->enable(
         'Auth::OAuth',
         consumer_key    => 'xxx',
@@ -52,6 +55,10 @@ sub call {
         token_secret    => '456'
     );
 
+    print $client->friends_timeline(
+      format => 'json'
+    )->body->[0]->{text};
+
 =head1 DESCRIPTION
 
 Net::HTTP::Spore::Middleware::Auth::OAuth is a middleware to handle OAuth mechanism. This middleware should be loaded as the last middleware, because it requires all parameters to be setted to calculate the signature.