line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::EveOnline::EveCentral::Request::QuickLookPath; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Games::EveOnline::EveCentral::Request::QuickLookPath::VERSION = '0.001'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Create a request for the quicklookpath endpoint. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
34889
|
use Moo 1.003001; |
|
1
|
|
|
|
|
17813
|
|
|
1
|
|
|
|
|
7
|
|
11
|
1
|
|
|
1
|
|
2995
|
use MooX::Types::MooseLike 0.25; |
|
1
|
|
|
|
|
1574
|
|
|
1
|
|
|
|
|
50
|
|
12
|
1
|
|
|
1
|
|
814
|
use MooX::StrictConstructor 0.006; |
|
1
|
|
|
|
|
13579
|
|
|
1
|
|
|
|
|
8
|
|
13
|
1
|
|
|
1
|
|
26813
|
use MooX::Types::MooseLike::Base qw(AnyOf ArrayRef HashRef Int Str); |
|
1
|
|
|
|
|
6764
|
|
|
1
|
|
|
|
|
130
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
28
|
use 5.012; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
47
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
extends 'Games::EveOnline::EveCentral::Request'; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
995
|
use Readonly 1.03; |
|
1
|
|
|
|
|
3466
|
|
|
1
|
|
|
|
|
432
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Readonly::Scalar my $ENDPOINT => 'quicklook/onpath'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'hours' => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
isa => Int, |
28
|
|
|
|
|
|
|
default => 360 |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has 'type_id' => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
isa => Int, |
34
|
|
|
|
|
|
|
required => 1 |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'min_q' => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
isa => Int, |
40
|
|
|
|
|
|
|
default => 1 |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'from_system' => ( |
44
|
|
|
|
|
|
|
is => 'ro', |
45
|
|
|
|
|
|
|
isa => AnyOf[Int, Str], |
46
|
|
|
|
|
|
|
required => 1 |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'to_system' => ( |
50
|
|
|
|
|
|
|
is => 'ro', |
51
|
|
|
|
|
|
|
isa => AnyOf[Int, Str], |
52
|
|
|
|
|
|
|
required => 1 |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
has '_path' => ( |
56
|
|
|
|
|
|
|
is => 'lazy', |
57
|
|
|
|
|
|
|
isa => Str, |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
has '_content' => ( |
61
|
|
|
|
|
|
|
is => 'lazy', |
62
|
|
|
|
|
|
|
isa => ArrayRef[Str] |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub request { |
68
|
1
|
|
|
1
|
1
|
1067
|
my $self = shift; |
69
|
1
|
|
|
|
|
30
|
my $path = $self->_path; |
70
|
1
|
|
|
|
|
31
|
my $content = $self->_content; |
71
|
|
|
|
|
|
|
|
72
|
1
|
|
|
|
|
20
|
return $self->http_request($path, $content); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub _build__path { |
78
|
2
|
|
|
2
|
|
10703
|
my $self = shift; |
79
|
|
|
|
|
|
|
|
80
|
2
|
|
|
|
|
8
|
my $path = $ENDPOINT . '/'; |
81
|
|
|
|
|
|
|
|
82
|
2
|
|
|
|
|
31
|
$path .= 'from/' . $self->from_system . '/' . |
83
|
|
|
|
|
|
|
'to/' . $self->to_system . '/' . |
84
|
|
|
|
|
|
|
'fortype/' . $self->type_id; |
85
|
|
|
|
|
|
|
|
86
|
2
|
|
|
|
|
49
|
return $path; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub _build__content { |
90
|
2
|
|
|
2
|
|
7722
|
my $self = shift; |
91
|
|
|
|
|
|
|
|
92
|
2
|
|
|
|
|
5
|
my @content; |
93
|
2
|
|
|
|
|
11
|
push @content, 'sethours', $self->hours; |
94
|
2
|
|
|
|
|
12
|
push @content, 'setminQ', $self->min_q; |
95
|
|
|
|
|
|
|
|
96
|
2
|
|
|
|
|
59
|
return \@content; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; # End of Games::EveOnline::EveCentral::Request::QuickLookPath |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
__END__ |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=pod |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 NAME |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Games::EveOnline::EveCentral::Request::QuickLookPath - Create a request for the quicklookpath endpoint. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 VERSION |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
version 0.001 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SYNOPSIS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
my $req = Games::EveOnline::EveCentral::Request::QuickLookPath->new( |
117
|
|
|
|
|
|
|
type_id => 34, # Mandatory. |
118
|
|
|
|
|
|
|
hours => 1, # defaults to 360 |
119
|
|
|
|
|
|
|
min_q => 10000, # defaults to 1 |
120
|
|
|
|
|
|
|
from_system => 30000142, # or 'Jita'. Mandatory. |
121
|
|
|
|
|
|
|
to_system => 30002187, # or 'Amarr'. Mandatory. |
122
|
|
|
|
|
|
|
)->request; |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 DESCRIPTION |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This class is used to create HTTP::Request objects suitable to call the |
127
|
|
|
|
|
|
|
`quicklookpath` method on EVE Central. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Please take care to only use valid type ids. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Examples: |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=over 4 |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item * L<http://api.eve-central.com/api/quicklook/onpath/from/Jita/to/Amarr/fortype/34> |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=back |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=for test_synopsis no strict 'vars' |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 METHODS |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 request |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Returns an HTTP::Request object which can be used to call the 'quicklookpath' |
146
|
|
|
|
|
|
|
endpoint. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=begin private |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=end private |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 AUTHOR |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Pedro Figueiredo, C<< <me at pedrofigueiredo.org> >> |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head1 BUGS |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
Please report any bugs or feature requests through the web interface at |
159
|
|
|
|
|
|
|
L<https://github.com/pfig/games-eveonline-evecentral/issues>. I will be |
160
|
|
|
|
|
|
|
notified, and then you'll automatically be notified of progress on your bug as |
161
|
|
|
|
|
|
|
I make changes. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 SUPPORT |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
perldoc Games::EveOnline::EveCentral |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
You can also look for information at: |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=over 4 |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=item * GitHub Issues (report bugs here) |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
L<https://github.com/pfig/games-eveonline-evecentral/issues> |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Games-EveOnline-EveCentral> |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=item * CPAN Ratings |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Games-EveOnline-EveCentral> |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=item * CPAN |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
L<http://metacpan.org/module/Games::EveOnline::EveCentral> |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=back |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=over 4 |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=item * The people behind EVE Central. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
L<http://eve-central.com/> |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=back |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
Copyright 2013 Pedro Figueiredo. |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
206
|
|
|
|
|
|
|
under the terms of the Artistic License. |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head1 AUTHOR |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
Pedro Figueiredo <me@pedrofigueiredo.org> |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Pedro Figueiredo. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
219
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=cut |