line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pithub::Users; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PLU'; |
3
|
|
|
|
|
|
|
our $VERSION = '0.01039'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Github v3 Users API |
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
15
|
|
9437
|
use Moo; |
|
15
|
|
|
|
|
10484
|
|
|
15
|
|
|
|
|
69
|
|
7
|
15
|
|
|
15
|
|
4961
|
use Carp qw( croak ); |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
635
|
|
8
|
15
|
|
|
15
|
|
5564
|
use Pithub::Users::Emails; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
394
|
|
9
|
15
|
|
|
15
|
|
5796
|
use Pithub::Users::Followers; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
368
|
|
10
|
15
|
|
|
15
|
|
5578
|
use Pithub::Users::Keys; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
2856
|
|
11
|
|
|
|
|
|
|
extends 'Pithub::Base'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub emails { |
15
|
1
|
|
|
1
|
1
|
503
|
return shift->_create_instance('Pithub::Users::Emails', @_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub followers { |
20
|
9
|
|
|
9
|
1
|
2429
|
return shift->_create_instance('Pithub::Users::Followers', @_); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub get { |
25
|
9
|
|
|
9
|
1
|
18398
|
my ( $self, %args ) = @_; |
26
|
9
|
100
|
|
|
|
34
|
if ( $args{user} ) { |
27
|
|
|
|
|
|
|
return $self->request( |
28
|
|
|
|
|
|
|
method => 'GET', |
29
|
7
|
|
|
|
|
77
|
path => sprintf( '/users/%s', delete $args{user} ), |
30
|
|
|
|
|
|
|
%args, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
2
|
|
|
|
|
9
|
return $self->request( |
34
|
|
|
|
|
|
|
method => 'GET', |
35
|
|
|
|
|
|
|
path => '/user', |
36
|
|
|
|
|
|
|
%args, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub keys { |
42
|
1
|
|
|
1
|
1
|
1560
|
return shift->_create_instance('Pithub::Users::Keys', @_); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub update { |
47
|
4
|
|
|
4
|
1
|
3162
|
my ( $self, %args ) = @_; |
48
|
4
|
100
|
|
|
|
24
|
croak 'Missing key in parameters: data (hashref)' unless ref $args{data} eq 'HASH'; |
49
|
3
|
|
|
|
|
18
|
return $self->request( |
50
|
|
|
|
|
|
|
method => 'PATCH', |
51
|
|
|
|
|
|
|
path => '/user', |
52
|
|
|
|
|
|
|
%args, |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |