File Coverage

blib/lib/WebService/PutIo/Transfers.pm
Criterion Covered Total %
statement 3 6 50.0
branch n/a
condition n/a
subroutine 1 4 25.0
pod 3 3 100.0
total 7 13 53.8


line stmt bran cond sub pod time code
1             package WebService::PutIo::Transfers;
2              
3 1     1   595 use base 'WebService::PutIo';
  1         3  
  1         1358  
4              
5             my $class='transfers';
6              
7 0     0 1   sub list { shift->request($class,'list',@_); }
8 0     0 1   sub cancel { shift->request($class,'cancel',@_); }
9 0     0 1   sub add { shift->request($class,'add',@_); }
10              
11             =head1 NAME
12              
13             WebService::PutIo::Transfers - Transfer Operations for put.io
14              
15             =head1 SYNOPSIS
16              
17             use WebService::PutIo::Transfers;
18             my $transfers=WebService::PutIo::Transfers->new(api_key=>'..',api_secret=>'..');
19             my $res=$transfers->list;
20             foreach my $transfer (@{$res->results}) {
21             print "Got ". Data::Dumper($transfers);
22             }
23              
24             =head1 DESCRIPTION
25              
26             Transfer related methods for the put.io web service
27              
28             =head1 METHODS
29              
30             =head2 list
31              
32             Returns a list of active transfers.
33              
34             =head2 cancel
35              
36             Cancels a transfer.
37              
38             =head3 Parameters:
39              
40             =over 4
41              
42             =item id
43              
44             =back
45              
46             =head2 add
47              
48             Adds urls to fetch and returns a list of active transfers.
49              
50             =head3 Parameters:
51              
52             =over 4
53              
54             =item links
55              
56             =back
57              
58             =head1 COPYRIGHT AND LICENSE
59              
60             Copyright (C) 2010, Marcus Ramberg.
61              
62             This program is free software, you can redistribute it and/or modify it under
63             the terms of the Artistic License version 2.0.
64              
65             =cut
66              
67             1;