File Coverage

blib/lib/WWW/Tumblr/User.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 19 84.2


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