GeoIP2/Record/MaxMind.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GeoIP2/Record/Location.pm ↑ Summary GeoIP2/Record/Postal.pm »
1 package GeoIP2::Record::MaxMind;
2 6 $GeoIP2::Record::MaxMind::VERSION = '0.050000';
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use GeoIP2::Types qw( NonNegativeInt );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 6 has queries_remaining => (
11 is => 'ro',
12 isa => NonNegativeInt,
13 );
14  
15 6 1;
16  
17 # ABSTRACT: Contains data for the maxmind record returned from a web service query
18  
19 __END__
20  
21 =pod
22  
23 =head1 NAME
24  
25 GeoIP2::Record::MaxMind - Contains data for the maxmind record returned from a web service query
26  
27 =head1 VERSION
28  
29 version 0.050000
30  
31 =head1 SYNOPSIS
32  
33 use 5.008;
34  
35 use GeoIP2::WebService::Client;
36  
37 my $client = GeoIP2::WebService::Client->new(
38 user_id => 42,
39 license_key => 'abcdef123456',
40 );
41  
42 my $insights = $client->insights( ip => '24.24.24.24' );
43  
44 my $maxmind_rec = $insights->maxmind();
45 say $maxmind_rec->queries_remaining();
46  
47 =head1 DESCRIPTION
48  
49 This class contains the maxmind record data returned from a web service query.
50  
51 Unlike other record classes, the data in this record is associated with your
52 MaxMind account, not with an IP address.
53  
54 This record is returned by all the end points.
55  
56 =head1 METHODS
57  
58 This class provides the following methods:
59  
60 =head2 $maxmind_rec->queries_remaining()
61  
62 The number of queries remaining for the end point you just queried. Note that
63 this is an approximation as query counts are only periodically synced across
64 all of MaxMind's servers.
65  
66 =head1 AUTHORS
67  
68 =over 4
69  
70 =item *
71  
72 Dave Rolsky <drolsky@maxmind.com>
73  
74 =item *
75  
76 Greg Oschwald <goschwald@maxmind.com>
77  
78 =item *
79  
80 Olaf Alders <oalders@maxmind.com>
81  
82 =back
83  
84 =head1 COPYRIGHT AND LICENSE
85  
86 This software is copyright (c) 2014 by MaxMind, Inc..
87  
88 This is free software; you can redistribute it and/or modify it under
89 the same terms as the Perl 5 programming language system itself.
90  
91 =cut
« GeoIP2/Record/Location.pm ↑ Summary GeoIP2/Record/Postal.pm »