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