line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pithub::GitData::Tags; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PLU'; |
3
|
|
|
|
|
|
|
our $VERSION = '0.01040'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Github v3 Git Data Tags API |
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
880
|
use Moo; |
|
16
|
|
|
|
|
31
|
|
|
16
|
|
|
|
|
82
|
|
7
|
16
|
|
|
16
|
|
4490
|
use Carp qw( croak ); |
|
16
|
|
|
|
|
43
|
|
|
16
|
|
|
|
|
3540
|
|
8
|
|
|
|
|
|
|
extends 'Pithub::Base'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub create { |
12
|
5
|
|
|
5
|
1
|
7630
|
my ( $self, %args ) = @_; |
13
|
5
|
100
|
|
|
|
34
|
croak 'Missing key in parameters: data (hashref)' unless ref $args{data} eq 'HASH'; |
14
|
3
|
|
|
|
|
19
|
$self->_validate_user_repo_args( \%args ); |
15
|
|
|
|
|
|
|
return $self->request( |
16
|
|
|
|
|
|
|
method => 'POST', |
17
|
3
|
|
|
|
|
28
|
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
|
1894
|
my ( $self, %args ) = @_; |
25
|
3
|
100
|
|
|
|
20
|
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
|
|
|
|
|
21
|
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__ |