| 1 | package WG::API::Clans; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use 5.014; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use base qw/WG::API/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | WG::API::Clans - provide access to clans info | ||||||||||
| 11 | |||||||||||
| 12 | =head1 VERSION | ||||||||||
| 13 | |||||||||||
| 14 | Version v0.05 | ||||||||||
| 15 | |||||||||||
| 16 | =cut | ||||||||||
| 17 | |||||||||||
| 18 | 2 | our $VERSION = 'v0.05'; | |||||||||
| 19 | |||||||||||
| 20 | =head1 SYNOPSIS | ||||||||||
| 21 | |||||||||||
| 22 | This modile provide access to serch clans, info about clans, clans members and clan roles | ||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | use WG::API::Clans; | ||||||||||
| 26 | |||||||||||
| 27 | my $foo = WG::API::Clans->new( { application_id => 'demo' } ); | ||||||||||
| 28 | my $list = $foo->clans_list( { search => 'Hellenes' } ); | ||||||||||
| 29 | ... | ||||||||||
| 30 | |||||||||||
| 31 | =head1 METHODS | ||||||||||
| 32 | |||||||||||
| 33 | =head2 clans_list | ||||||||||
| 34 | |||||||||||
| 35 | Method searches through clans and sorts them in a specified order. | ||||||||||
| 36 | |||||||||||
| 37 | =cut | ||||||||||
| 38 | |||||||||||
| 39 | sub clans_list { | ||||||||||
| 40 | 2 | ▶ | my ( $self, $params ) = @_; | ||||||||
|
Subroutine
clans_list: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 41 | |||||||||||
| 42 | 2 | $self->_request( 'get', 'clans/list', ['language', 'fields', 'search', 'orded_by', 'limit', 'page_no' ], undef, $params ); | |||||||||
| 43 | |||||||||||
| 44 | 2 | ▶ | return $self->status eq 'ok' ? $self->response : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | =head2 clans_info | ||||||||||
| 48 | |||||||||||
| 49 | Method returns detailed clan information. | ||||||||||
| 50 | |||||||||||
| 51 | =cut | ||||||||||
| 52 | |||||||||||
| 53 | sub clans_info { | ||||||||||
| 54 | 0 | ▶ | my ( $self, $params ) = @_; | ||||||||
|
Subroutine
clans_info: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 55 | |||||||||||
| 56 | 0 | $self->_request( 'get', 'clans/info', ['language', 'fields', 'access_token', 'clan_id'], ['clan_id'], $params ); | |||||||||
| 57 | |||||||||||
| 58 | 0 | ▶ | return $self->status eq 'ok' ? $self->response : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | =head2 clans_membersinfo | ||||||||||
| 62 | |||||||||||
| 63 | Method returns clan member info and short info on the clan. | ||||||||||
| 64 | |||||||||||
| 65 | =cut | ||||||||||
| 66 | |||||||||||
| 67 | sub clans_membersinfo { | ||||||||||
| 68 | 0 | ▶ | my ( $self, $params ) = @_; | ||||||||
|
Subroutine
clans_membersinfo: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 69 | |||||||||||
| 70 | 0 | $self->_request( 'get', 'clans/membersinfo', ['language', 'fields', 'account_id'], ['account_id'], $params ); | |||||||||
| 71 | |||||||||||
| 72 | 0 | ▶ | return $self->status eq 'ok' ? $self->response : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | =head2 clans_glossary | ||||||||||
| 76 | |||||||||||
| 77 | Method returns information on clan entities. | ||||||||||
| 78 | |||||||||||
| 79 | =cut | ||||||||||
| 80 | |||||||||||
| 81 | sub clans_glossary { | ||||||||||
| 82 | 0 | ▶ | my ( $self, $params ) = @_; | ||||||||
|
Subroutine
clans_glossary: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 83 | |||||||||||
| 84 | 0 | $self->_request( 'get', 'clans/glossary', ['language', 'fields'], undef, $params ); | |||||||||
| 85 | |||||||||||
| 86 | 0 | ▶ | return $self->status eq 'ok' ? $self->response : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | } | ||||||||||
| 88 | |||||||||||
| 89 | =head1 BUGS | ||||||||||
| 90 | |||||||||||
| 91 | Please report any bugs or feature requests to C<cynovg at cpan.org>, or through the web interface at L<https://github.com/cynovg/WG-API/issues>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. | ||||||||||
| 92 | |||||||||||
| 93 | =head1 SUPPORT | ||||||||||
| 94 | |||||||||||
| 95 | You can find documentation for this module with the perldoc command. | ||||||||||
| 96 | |||||||||||
| 97 | perldoc WG::API | ||||||||||
| 98 | |||||||||||
| 99 | You can also look for information at: | ||||||||||
| 100 | |||||||||||
| 101 | =over 4 | ||||||||||
| 102 | |||||||||||
| 103 | =item * RT: GitHub's request tracker (report bugs here) | ||||||||||
| 104 | |||||||||||
| 105 | L<https://github.com/cynovg/WG-API/issues> | ||||||||||
| 106 | |||||||||||
| 107 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||
| 108 | |||||||||||
| 109 | L<http://annocpan.org/dist/WG-API> | ||||||||||
| 110 | |||||||||||
| 111 | =item * CPAN Ratings | ||||||||||
| 112 | |||||||||||
| 113 | L<http://cpanratings.perl.org/d/WG-API> | ||||||||||
| 114 | |||||||||||
| 115 | =item * Search CPAN | ||||||||||
| 116 | |||||||||||
| 117 | L<http://search.cpan.org/dist/WG-API/> | ||||||||||
| 118 | |||||||||||
| 119 | =back | ||||||||||
| 120 | |||||||||||
| 121 | |||||||||||
| 122 | =head1 ACKNOWLEDGEMENTS | ||||||||||
| 123 | |||||||||||
| 124 | ... | ||||||||||
| 125 | |||||||||||
| 126 | =head1 SEE ALSO | ||||||||||
| 127 | |||||||||||
| 128 | WG API Reference L<http://ru.wargaming.net/developers/> | ||||||||||
| 129 | |||||||||||
| 130 | =head1 AUTHOR | ||||||||||
| 131 | |||||||||||
| 132 | cynovg , C<< <cynovg at cpan.org> >> | ||||||||||
| 133 | |||||||||||
| 134 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 135 | |||||||||||
| 136 | Copyright 2015 Cyrill Novgorodcev. | ||||||||||
| 137 | |||||||||||
| 138 | This program is free software; you can redistribute it and/or modify it | ||||||||||
| 139 | under the terms of the the Artistic License (2.0). You may obtain a | ||||||||||
| 140 | copy of the full license at: | ||||||||||
| 141 | |||||||||||
| 142 | L<http://www.perlfoundation.org/artistic_license_2_0> | ||||||||||
| 143 | |||||||||||
| 144 | Any use, modification, and distribution of the Standard or Modified | ||||||||||
| 145 | Versions is governed by this Artistic License. By using, modifying or | ||||||||||
| 146 | distributing the Package, you accept this license. Do not use, modify, | ||||||||||
| 147 | or distribute the Package, if you do not accept this license. | ||||||||||
| 148 | |||||||||||
| 149 | If your Modified Version has been derived from a Modified Version made | ||||||||||
| 150 | by someone other than you, you are nevertheless required to ensure that | ||||||||||
| 151 | your Modified Version complies with the requirements of this license. | ||||||||||
| 152 | |||||||||||
| 153 | This license does not grant you the right to use any trademark, service | ||||||||||
| 154 | mark, tradename, or logo of the Copyright Holder. | ||||||||||
| 155 | |||||||||||
| 156 | This license includes the non-exclusive, worldwide, free-of-charge | ||||||||||
| 157 | patent license to make, have made, use, offer to sell, sell, import and | ||||||||||
| 158 | otherwise transfer the Package with respect to any patent claims | ||||||||||
| 159 | licensable by the Copyright Holder that are necessarily infringed by the | ||||||||||
| 160 | Package. If you institute patent litigation (including a cross-claim or | ||||||||||
| 161 | counterclaim) against any party alleging that the Package constitutes | ||||||||||
| 162 | direct or contributory patent infringement, then this Artistic License | ||||||||||
| 163 | to you shall terminate on the date that such litigation is filed. | ||||||||||
| 164 | |||||||||||
| 165 | Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER | ||||||||||
| 166 | AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. | ||||||||||
| 167 | THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||||||||||
| 168 | PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY | ||||||||||
| 169 | YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR | ||||||||||
| 170 | CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR | ||||||||||
| 171 | CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, | ||||||||||
| 172 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||||||
| 173 | |||||||||||
| 174 | |||||||||||
| 175 | =cut | ||||||||||
| 176 | |||||||||||
| 177 | 2 | 1; # End of WG::API::Clans | |||||||||