line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::GitHub::V3::Search; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.68'; |
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:FAYLAND'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
295
|
use URI::Escape; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
431
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Net::GitHub::V3::Query'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub repositories { |
13
|
0
|
|
|
0
|
1
|
|
my ( $self, $args ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# for old |
16
|
0
|
0
|
|
|
|
|
unless (ref($args) eq 'HASH') { |
17
|
0
|
|
|
|
|
|
$args = { q => $args }; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $uri = URI->new('/search/repositories'); |
21
|
0
|
|
|
|
|
|
$uri->query_form($args); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $url = $uri->as_string; |
24
|
0
|
|
|
|
|
|
$url =~ s/%3A/:/g; |
25
|
0
|
|
|
|
|
|
$url =~ s/%2B/+/g; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $self->query($url); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub code { |
31
|
0
|
|
|
0
|
1
|
|
my ( $self, $args ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# for old |
34
|
0
|
0
|
|
|
|
|
unless (ref($args) eq 'HASH') { |
35
|
0
|
|
|
|
|
|
$args = { q => $args }; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $uri = URI->new('/search/code'); |
39
|
0
|
|
|
|
|
|
$uri->query_form($args); |
40
|
0
|
|
|
|
|
|
return $self->query($uri->as_string); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub issues { |
44
|
0
|
|
|
0
|
1
|
|
my ( $self, $args ) = @_; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# for old |
47
|
0
|
0
|
|
|
|
|
unless (ref($args) eq 'HASH') { |
48
|
0
|
|
|
|
|
|
$args = { q => $args }; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
my $uri = URI->new('/search/issues'); |
52
|
0
|
|
|
|
|
|
$uri->query_form($args); |
53
|
0
|
|
|
|
|
|
return $self->query($uri->as_string); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub users { |
57
|
0
|
|
|
0
|
1
|
|
my ( $self, $args ) = @_; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# for old |
60
|
0
|
0
|
|
|
|
|
unless (ref($args) eq 'HASH') { |
61
|
0
|
|
|
|
|
|
$args = { q => $args }; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
my $uri = URI->new('/search/users'); |
65
|
0
|
|
|
|
|
|
$uri->query_form($args); |
66
|
0
|
|
|
|
|
|
return $self->query($uri->as_string); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
## DEPERCATED |
70
|
|
|
|
|
|
|
sub repos { |
71
|
0
|
|
|
0
|
0
|
|
(shift)->repositories(@_); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
sub user { |
74
|
0
|
|
|
0
|
0
|
|
(shift)->repositories(@_); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
1
|
|
|
1
|
|
7
|
no Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
__END__ |