blib/lib/WG/API/WoT/Accounts.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 100% 4 / 4 totaltotal 46.6% 21 / 45 CC 5 SCAR 14.7
CC
5
Cov
39%
account_list
6.0
account_info
6.0
account_tanks
6.0
CRAP 4.3
« blib/lib/WG/API/WoWp/Ratings.pm ↑ Summary blib/lib/WG/API/WoWs/Accounts.pm »
1 package WG::API::WoT::Accounts;
2  
3 1 ▶use v5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base qw/WG::API::WoT/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WG::API::WoT::Accounts
11  
12 =head1 VERSION
13  
14 Version v0.05
15  
16 =cut
17  
18 1 our $VERSION = 'v0.05';
19  
20 =head1 METHODS
21  
22 =head2 account_list
23  
24 Method returns partial list of players. The list is filtered by initial characters of user name and sorted alphabetically.
25  
26 =cut
27  
28 sub account_list {
29 0 ▶ my $self = shift;
Subroutine account_list: not called CC=2 SCAR=17.9
Pod documented
30  
31 0 $self->_request( 'get', 'account/list', ['language', 'fields', 'type', 'search', 'limit' ], ['search'], $_[0] );
32  
33 0 ▶ return $self->status eq 'ok' ? $self->response : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->status eq 'ok' ? : 0 0 0
34 }
35  
36 =head2 account_info
37  
38 Method returns player details.
39  
40 =cut
41  
42 sub account_info {
43 0 ▶ my $self = shift;
Subroutine account_info: not called CC=2 SCAR=17.9
Pod documented
44  
45 0 $self->_request( 'get', 'account/info', ['language', 'fields', 'access_token', 'extra', 'account_id'], ['account_id'], $_[0] );
46  
47 0 ▶ return $self->status eq 'ok' ? $self->response : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->status eq 'ok' ? : 0 0 0
48 }
49  
50 =head2 account_tanks
51  
52 Method returns details on player's vehicles.
53  
54 =cut
55  
56 sub account_tanks {
57 0 ▶ my $self = shift;
Subroutine account_tanks: not called CC=2 SCAR=17.9
Pod documented
58  
59 0 $self->_request( 'get', 'account/tanks', ['language', 'fields', 'access_token', 'account_id', 'tank_id'], ['account_id'], $_[0] );
60  
61 0 ▶ return $self->status eq 'ok' ? $self->response : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->status eq 'ok' ? : 0 0 0
62 }
63  
64 =head2 account_achievements
65  
66 Method returns players' achievement details.
67  
68 Achievement properties define the achievements field values (ref. Achievements):
69  
70 =over
71  
72 =item *
73  
74 1-4 for Mastery Badges and Stage Achievements (type: "class");
75  
76 =item *
77  
78 maximum value of Achievement series (type: "series");
79  
80 =item *
81  
82 number of achievements earned from sections: Battle Hero, Epic Achievements, Group Achievements, Special Achievements, etc. (type: "repeatable, single, custom").
83  
84 =back
85  
86 =cut
87  
88 sub account_achievements {
89 0 ▶ my $self = shift;
Subroutine account_achievements: not called CC=2 SCAR=17.9
Pod documented
90  
91 0 $self->_request( 'get', 'account/achievements', ['language', 'fields', 'account_id'], ['account_id'], $_[0] );
92
93 0 ▶ return $self->status eq 'ok' ? $self->response : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->status eq 'ok' ? : 0 0 0
94 }
95  
96 =head1 BUGS
97  
98 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.
99  
100 =head1 SUPPORT
101  
102 You can find documentation for this module with the perldoc command.
103  
104 perldoc WG::API
105  
106 You can also look for information at:
107  
108 =over 4
109  
110 =item * RT: GitHub's request tracker (report bugs here)
111  
112 L<https://github.com/cynovg/WG-API/issues>
113  
114 =item * AnnoCPAN: Annotated CPAN documentation
115  
116 L<http://annocpan.org/dist/WG-API>
117  
118 =item * CPAN Ratings
119  
120 L<http://cpanratings.perl.org/d/WG-API>
121  
122 =item * Search CPAN
123  
124 L<http://search.cpan.org/dist/WG-API/>
125  
126 =back
127  
128  
129 =head1 ACKNOWLEDGEMENTS
130  
131 ...
132  
133 =head1 SEE ALSO
134  
135 WG API Reference L<http://ru.wargaming.net/developers/>
136  
137 =head1 AUTHOR
138  
139 cynovg , C<< <cynovg at cpan.org> >>
140  
141 =head1 LICENSE AND COPYRIGHT
142  
143 Copyright 2015 Cyrill Novgorodcev.
144  
145 This program is free software; you can redistribute it and/or modify it
146 under the terms of the the Artistic License (2.0). You may obtain a
147 copy of the full license at:
148  
149 L<http://www.perlfoundation.org/artistic_license_2_0>
150  
151 Any use, modification, and distribution of the Standard or Modified
152 Versions is governed by this Artistic License. By using, modifying or
153 distributing the Package, you accept this license. Do not use, modify,
154 or distribute the Package, if you do not accept this license.
155  
156 If your Modified Version has been derived from a Modified Version made
157 by someone other than you, you are nevertheless required to ensure that
158 your Modified Version complies with the requirements of this license.
159  
160 This license does not grant you the right to use any trademark, service
161 mark, tradename, or logo of the Copyright Holder.
162  
163 This license includes the non-exclusive, worldwide, free-of-charge
164 patent license to make, have made, use, offer to sell, sell, import and
165 otherwise transfer the Package with respect to any patent claims
166 licensable by the Copyright Holder that are necessarily infringed by the
167 Package. If you institute patent litigation (including a cross-claim or
168 counterclaim) against any party alleging that the Package constitutes
169 direct or contributory patent infringement, then this Artistic License
170 to you shall terminate on the date that such litigation is filed.
171  
172 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
173 AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
174 THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
175 PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
176 YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
177 CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
178 CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
179 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
180  
181  
182 =cut
183  
184 1 1; # End of WG::API::WoT::Accounts
« blib/lib/WG/API/WoWp/Ratings.pm ↑ Summary blib/lib/WG/API/WoWs/Accounts.pm »