line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pithub::GitData::Tags; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PLU'; |
3
|
|
|
|
|
|
|
our $VERSION = '0.01039'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Github v3 Git Data Tags API |
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
15
|
|
868
|
use Moo; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
84
|
|
7
|
15
|
|
|
15
|
|
4074
|
use Carp qw( croak ); |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
3215
|
|
8
|
|
|
|
|
|
|
extends 'Pithub::Base'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub create { |
12
|
5
|
|
|
5
|
1
|
8618
|
my ( $self, %args ) = @_; |
13
|
5
|
100
|
|
|
|
34
|
croak 'Missing key in parameters: data (hashref)' unless ref $args{data} eq 'HASH'; |
14
|
3
|
|
|
|
|
24
|
$self->_validate_user_repo_args( \%args ); |
15
|
|
|
|
|
|
|
return $self->request( |
16
|
|
|
|
|
|
|
method => 'POST', |
17
|
3
|
|
|
|
|
35
|
path => sprintf( '/repos/%s/%s/git/tags', delete $args{user}, delete $args{repo} ), |
18
|
|
|
|
|
|
|
%args, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub get { |
24
|
3
|
|
|
3
|
1
|
1975
|
my ( $self, %args ) = @_; |
25
|
3
|
100
|
|
|
|
17
|
croak 'Missing key in parameters: sha' unless $args{sha}; |
26
|
2
|
|
|
|
|
14
|
$self->_validate_user_repo_args( \%args ); |
27
|
|
|
|
|
|
|
return $self->request( |
28
|
|
|
|
|
|
|
method => 'GET', |
29
|
2
|
|
|
|
|
24
|
path => sprintf( '/repos/%s/%s/git/tags/%s', delete $args{user}, delete $args{repo}, delete $args{sha} ), |
30
|
|
|
|
|
|
|
%args, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |