NAME

WWW::Snooze - Simple RESTful API

SYNOPSIS

Using HTTP::Headers to override pieces of the request, REST operations can be performed like so:

use WWW::Snooze;
use WWW::Snooze::Serialize::JSON;
use HTTP::Headers;
use Data::Dumper;

my $api = WWW::Snooze::request(
    'https://agilezen.com/api/v1',
    headers => HTTP::Headers->new(
        'X-Zen-ApiKey' => 'key'
    ),
    serializer => WWW::Snooze::Serialize::JSON->new(
        extension => ''
    )
);

my $tasks = $api->projects(40075)->stories;
print Dumper($tasks->get());

my $hdr = HTTP::Headers->new();
$hdr->authorization_basic('key', '');
my $chili = WWW::Snooze::request(
    'http://chili.example.com',
    headers => $hdr,
);
print Dumper($chili->issues(undef, limit => 1)->get());

METHODS

request($baseurl, %args)

headers

Override headers with an instance of HTTP::Headers

serializer

Override serializer with and instance of WWW::Snooze::Serialize

AUTHOR

Anthony Johnson <aj@ohess.org>