summary refs log tree commit diff
path: root/eg/api.pl
blob: 60559ffc3088d54a907c6e76a9e73c89ebdaf554 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
use 5.010;

use Net::HTTP::Spore;

my $api = Net::HTTP::Spore->new_from_spec(shift);

$api->enable('Net::HTTP::Spore::Middleware::Format::JSON');

my ( $content, $result ) = $api->get_info( format => 'json', username => 'franckcuny' );

say "name => ". $content->{body}->{user}->{name};