line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of GitHub-API |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2013 by Chris Weyl. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# The GNU Lesser General Public License, Version 2.1, February 1999 |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
package GitHub::API::Repo::Keys; |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
$GitHub::API::Repo::Keys::VERSION = '0.000000_03'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ABSTRACT: A list of a repository's hooks |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
647
|
use common::sense; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
18
|
1
|
|
|
1
|
|
1255
|
use autobox::Core; |
|
1
|
|
|
|
|
10446
|
|
|
1
|
|
|
|
|
10
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
763
|
use parent 'GitHub::API::Base'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#use aliased 'GitHub::API::Hook'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# debugging... |
25
|
|
|
|
|
|
|
#use Smart::Comments '###'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub all { |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift @_; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
0
|
|
|
|
return $self->{_keys} //= $self->_get; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub create { |
36
|
0
|
|
|
0
|
1
|
|
my ($self, %key) = @_; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
delete $self->{_keys}; |
39
|
0
|
|
|
|
|
|
my $key = $self->_post(\%key); |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $key; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub rm { |
46
|
0
|
|
|
0
|
1
|
|
my ($self, $id) = @_; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
delete $self->{_keys}; |
49
|
0
|
|
|
|
|
|
return $self->_delete(undef, "/$id"); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
!!42; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |