File Coverage

blib/lib/WWW/Tumblr/User.pm
Criterion Covered Total %
statement 15 16 93.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 23 86.9


line stmt bran cond sub pod time code
1             package WWW::Tumblr::User;
2              
3 16     16   115 use Moose;
  16         32  
  16         125  
4 16     16   135384 use Carp;
  16         38  
  16         1605  
5 16     16   111 use strict;
  16         29  
  16         768  
6 16     16   115 use warnings;
  16         48  
  16         1197  
7              
8 16     16   107 use WWW::Tumblr::API;
  16         57  
  16         156  
9              
10             extends 'WWW::Tumblr';
11              
12             tumblr_api_method $_, [ 'GET', 'oauth' ] for qw( info dashboard likes following );
13             tumblr_api_method $_, [ 'POST', 'oauth' ] for qw( follow unfollow like unlike );
14              
15 0     0 0   sub user { Carp::croak "Unimplemented" }
16              
17              
18             1;
19              
20             =pod
21              
22             =head1 NAME
23              
24             WWW::Tumblr::User
25              
26             =head1 SYNOPSIS
27              
28             my $user = $tumblr->user;
29            
30             # as per http://www.tumblr.com/docs/en/api/v2#user-methods
31             my $dashboard = $user->dashboard;
32             my $likes = $user->likes(
33             limit => 1,
34             );
35              
36             die "booyah!" unless $dashboard or $likes;
37              
38             =head1 BUGS
39              
40             Please refer to L<WWW::Tumblr>.
41              
42             =head1 AUTHOR(S)
43              
44             The same folks as L<WWW::Tumblr>.
45              
46             =head1 SEE ALSO
47              
48             L<WWW::Tumblr>, L<WWW::Tumblr::ResponseError>.
49              
50             =head1 COPYRIGHT and LICENSE
51              
52             Same as L<WWW::Tumblr>.
53              
54             =cut
55