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

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