Rarbg-torrentapi

Perl Module to interact with https://torrentapi.org
git clone https://git.onna.be/Rarbg-torrentapi.git
Log | Files | Refs | README | LICENSE

commit f2125525e155737bc7a69fb6b7af26cb8437634d
parent 861d2d7af9658c454033f320d2efe856a6e7832f
Author: Paco Esteban <paco@onna.be>
Date:   Mon,  7 Sep 2015 13:46:46 +0200

basic failing tests

Diffstat:
cpanfile | 2+-
lib/Rarbg/torrentapi.pm | 35+++++++++++++++++++++++++++++++++--
t/basic.t | 11++++++++---
3 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/cpanfile b/cpanfile @@ -1,6 +1,6 @@ requires 'perl', '5.008005'; -# requires 'Some::Module', 'VERSION'; +requires 'Moose', '0'; on test => sub { requires 'Test::More', '0.96'; diff --git a/lib/Rarbg/torrentapi.pm b/lib/Rarbg/torrentapi.pm @@ -3,7 +3,18 @@ package Rarbg::torrentapi; use strict; use 5.008_005; our $VERSION = '0.01'; +use Moose; +sub search { + #body ... +} + +sub list { + #body ... +} + +no Moose; +__PACKAGE__->meta->make_immutable; 1; __END__ @@ -11,7 +22,7 @@ __END__ =head1 NAME -Rarbg::torrentapi - Blah blah blah +Rarbg::torrentapi - Wrapper around Rarbg torrentapi (https://torrentapi.org/apidocs_v2.txt) =head1 SYNOPSIS @@ -19,7 +30,27 @@ Rarbg::torrentapi - Blah blah blah =head1 DESCRIPTION -Rarbg::torrentapi is +Rarbg::torrentapi is a simple wrapper around Rarbg's torrentapi (JSON format) + +=head1 ATTRIBUTES + +=head2 token + +This attribute is ro. It's get automatically on every first request. It remains cached for further requests. As per API specification, it will expire in 15 minutes. + +=head1 METHODS + +=head2 new + +Just a simple constructor. + +=head2 search + +Calls Rarbg::torrentapi::Call and passes a Rarbg::torrentapi::Req formated for search. + +=head2 list + +Calls Rarbg::torrentapi::Call and passes a Rarbg::torrentapi::Req formated for list. =head1 AUTHOR diff --git a/t/basic.t b/t/basic.t @@ -1,8 +1,13 @@ use strict; use Test::More; -use Rarbg::torrentapi; -# replace with the actual test -ok 1; +BEGIN { + use_ok('Rarbg::torrentapi'); +} + +can_ok('Rarbg::torrentapi', qw( new search_torrent )); + +my %attr = ( +); done_testing;