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