AnyEvent::WebService::Tracks - Access Tracks' API from AnyEvent
0.02
use AnyEvent::WebService::Tracks; my $tracks = AnyEvent::WebService::Tracks->new( url => 'http://my.tracks.instance/', username => 'user', password => 'pa55w0rd', ); $tracks->projects(sub { my ( $projects ) = @_; say foreach @$projects; }); AnyEvent->condvar->recv;
AnyEvent::WebService::Tracks talks to Tracks' API from an AnyEvent loop, using AnyEvent::HTTP.
Before you go ahead and use this module, please make sure you run the test suite against the Tracks version you'll be using; I developed this module against Tracks 1.7.2, so I can't really guarantee it'll work with any other version. If you find a bug when running against another version, please let me know and I'll try to fix it as long as it doesn't break other versions.
Creates a new AnyEvent::WebService::Tracks object. %params must contain the url, username, and password parameters.
%params
Retrieves the list of projects in the given Tracks installation and provides them to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Creates a new project with the given name (a hash of parameters can be provided instead of just a scalar name if more flexibility is desired) and passes the new project object to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Retrieves the list of contexts in the given Tracks installation and provides them to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Creates a new context with the given name (a hash of parameters can be provided instead of just a scalar name if more flexibility is desired) and passes the new context object to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Retrieves the list of todos in the given Tracks installation and provides them to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Creates a new todo with the given name and context (a hash of parameters can be provided instead of just two scalars if more flexibility is desired) and passes the new todo object to the given callback. If the call fails, then a falsy value and the error message are provided to the callback.
Rob Hoelz, rob at hoelz.ro
rob at hoelz.ro
Please report any bugs or feature requests to bug-AnyEvent-WebService-Tracks at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-WebService-Tracks. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-AnyEvent-WebService-Tracks at rt.cpan.org
Copyright 2011 Rob Hoelz.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://getontracks.org
To install AnyEvent::WebService::Tracks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::WebService::Tracks
CPAN shell
perl -MCPAN -e shell install AnyEvent::WebService::Tracks
For more information on module installation, please visit the detailed CPAN module installation guide.