diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-10-17 21:40:28 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-10-17 21:40:28 +0200 |
| commit | dba1ee2b1252ad4ef8a64622daf6c2dd5ddb2557 (patch) | |
| tree | 1205fdabbbfa45c25cab88d464eca1becec9e9c7 | |
| parent | update version and changes (diff) | |
| download | net-http-spore-dba1ee2b1252ad4ef8a64622daf6c2dd5ddb2557.tar.gz | |
simplify github example
Diffstat (limited to '')
| -rw-r--r-- | eg/api.pl | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -4,21 +4,10 @@ use 5.010; use Net::HTTP::Spore; -my $username = shift; -my $token = shift; - my $api = Net::HTTP::Spore->new_from_spec(shift); $api->enable('Net::HTTP::Spore::Middleware::Format::JSON'); -$api->enable( - 'Net::HTTP::Spore::Middleware::Auth::Basic', - username => $username, - password => $token, -); - -my ( $content, $result ) = - $api->user_information( format => 'json', username => 'franckcuny' ); +my ( $content, $result ) = $api->user_information( format => 'json', username => 'franckcuny' ); -use YAML::Syck; -warn Dump $content; +say "name => ". $content->{body}->{user}->{name}; |
