blib/lib/WG/API/Servers.pm

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