GeoIP2/Record/MaxMind.pm

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