line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pithub::Users::Emails; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PLU'; |
3
|
|
|
|
|
|
|
our $VERSION = '0.01039'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Github v3 User Emails API |
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
15
|
|
96
|
use Moo; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
73
|
|
7
|
15
|
|
|
15
|
|
3746
|
use Carp qw( croak ); |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
3167
|
|
8
|
|
|
|
|
|
|
extends 'Pithub::Base'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub add { |
12
|
5
|
|
|
5
|
1
|
9824
|
my ( $self, %args ) = @_; |
13
|
5
|
100
|
|
|
|
29
|
croak 'Missing key in parameters: data (arrayref)' unless ref $args{data} eq 'ARRAY'; |
14
|
4
|
|
|
|
|
31
|
return $self->request( |
15
|
|
|
|
|
|
|
method => 'POST', |
16
|
|
|
|
|
|
|
path => '/user/emails', |
17
|
|
|
|
|
|
|
%args, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub delete { |
23
|
5
|
|
|
5
|
1
|
5018
|
my ( $self, %args ) = @_; |
24
|
5
|
100
|
|
|
|
27
|
croak 'Missing key in parameters: data (arrayref)' unless ref $args{data} eq 'ARRAY'; |
25
|
4
|
|
|
|
|
20
|
return $self->request( |
26
|
|
|
|
|
|
|
method => 'DELETE', |
27
|
|
|
|
|
|
|
path => '/user/emails', |
28
|
|
|
|
|
|
|
%args, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub list { |
34
|
3
|
|
|
3
|
1
|
2528
|
my ( $self, %args ) = @_; |
35
|
3
|
|
|
|
|
26
|
return $self->request( |
36
|
|
|
|
|
|
|
method => 'GET', |
37
|
|
|
|
|
|
|
path => '/user/emails', |
38
|
|
|
|
|
|
|
%args, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |