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

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