Anthony Johnson > WWW-Snooze-0.01_02 > WWW::Snooze

Download:
WWW-Snooze-0.01_02.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.01_02   Source  

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

Returns an instance of WWW::Snooze::Request

AUTHOR ^

Anthony Johnson <aj@ohess.org>

syntax highlighting: