line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pithub::Issues::Events; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PLU'; |
3
|
|
|
|
|
|
|
our $VERSION = '0.01039'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Github v3 Issue Events API |
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
92
|
use Moo; |
|
16
|
|
|
|
|
32
|
|
|
16
|
|
|
|
|
78
|
|
7
|
16
|
|
|
16
|
|
4230
|
use Carp qw( croak ); |
|
16
|
|
|
|
|
26
|
|
|
16
|
|
|
|
|
3782
|
|
8
|
|
|
|
|
|
|
extends 'Pithub::Base'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub get { |
12
|
3
|
|
|
3
|
1
|
6758
|
my ( $self, %args ) = @_; |
13
|
3
|
100
|
|
|
|
19
|
croak 'Missing key in parameters: event_id' unless $args{event_id}; |
14
|
2
|
|
|
|
|
22
|
$self->_validate_user_repo_args( \%args ); |
15
|
|
|
|
|
|
|
return $self->request( |
16
|
|
|
|
|
|
|
method => 'GET', |
17
|
2
|
|
|
|
|
28
|
path => sprintf( '/repos/%s/%s/issues/events/%s', delete $args{user}, delete $args{repo}, delete $args{event_id} ), |
18
|
|
|
|
|
|
|
%args, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub list { |
24
|
3
|
|
|
3
|
1
|
3100
|
my ( $self, %args ) = @_; |
25
|
3
|
|
|
|
|
16
|
$self->_validate_user_repo_args( \%args ); |
26
|
3
|
100
|
|
|
|
11
|
if ( my $issue_id = delete $args{issue_id} ) { |
27
|
|
|
|
|
|
|
return $self->request( |
28
|
|
|
|
|
|
|
method => 'GET', |
29
|
2
|
|
|
|
|
22
|
path => sprintf( '/repos/%s/%s/issues/%s/events', delete $args{user}, delete $args{repo}, $issue_id ), |
30
|
|
|
|
|
|
|
%args, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
return $self->request( |
34
|
|
|
|
|
|
|
method => 'GET', |
35
|
1
|
|
|
|
|
7
|
path => sprintf( '/repos/%s/%s/issues/events', delete $args{user}, delete $args{repo} ), |
36
|
|
|
|
|
|
|
%args, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |