File Coverage

lib/WebService/Qiita/Client/Users.pm
Criterion Covered Total %
statement 25 25 100.0
branch 6 6 100.0
condition n/a
subroutine 9 9 100.0
pod 0 5 0.0
total 40 45 88.8


line stmt bran cond sub pod time code
1             package WebService::Qiita::Client::Users;
2 6     6   2505 use strict;
  6         10  
  6         171  
3 6     6   27 use warnings;
  6         9  
  6         130  
4 6     6   25 use utf8;
  6         8  
  6         29  
5              
6 6     6   148 use parent qw(WebService::Qiita::Client::Base);
  6         11  
  6         32  
7              
8             sub user_items {
9 2     2 0 36 my ($self, $url_name, $params) = @_;
10              
11 2 100       35 my $path = defined $url_name ? "/users/$url_name/items" : '/items';
12 2         18 $self->get($path, $params);
13             }
14              
15             sub user_following_tags {
16 1     1 0 3 my ($self, $url_name, $params) = @_;
17 1         8 $self->get("/users/$url_name/following_tags", $params);
18             }
19              
20             sub user_following_users {
21 1     1 0 3 my ($self, $url_name, $params) = @_;
22 1         7 $self->get("/users/$url_name/following_users", $params);
23             }
24              
25             sub user_stocks {
26 2     2 0 28 my ($self, $url_name, $params) = @_;
27              
28 2 100       9 my $path = defined $url_name ? "/users/$url_name/stocks" : '/stocks';
29 2         10 $self->get($path, $params);
30             }
31              
32             sub user {
33 2     2 0 32 my ($self, $url_name) = @_;
34              
35 2 100       7 my $path = defined $url_name ? "/users/$url_name" : '/user';
36 2         10 $self->get($path);
37             }
38              
39             1;