1GeoIP2::Model::InsightsU(s3e)r Contributed Perl DocumentaGteiooInP2::Model::Insights(3)
2
3
4

NAME

6       GeoIP2::Model::Insights - Model class for GeoIP2 Precision: Insights
7

VERSION

9       version 2.006002
10

SYNOPSIS

12         use 5.008;
13
14         use GeoIP2::WebService::Client;
15
16         my $client = GeoIP2::WebService::Client->new(
17             account_id  => 42,
18             license_key => 'abcdef123456',
19         );
20
21         my $insights = $client->insights( ip => '24.24.24.24' );
22
23         my $city_rec = $insights->city();
24         print $city_rec->name(), "\n";
25

DESCRIPTION

27       This class provides a model for the data returned by the GeoIP2
28       Precision: Insights web service.
29
30       The only difference between the City and Insights model classes is
31       which fields in each record may be populated. See
32       <http://dev.maxmind.com/geoip/geoip2/web-services> for more details.
33

METHODS

35       This class provides the following methods.
36
37   $insights->city()
38       Returns a GeoIP2::Record::City object representing city data for the
39       requested IP address.
40
41   $insights->continent()
42       Returns a GeoIP2::Record::Continent object representing continent data
43       for the requested IP address.
44
45   $insights->country()
46       Returns a GeoIP2::Record::Country object representing country data for
47       the requested IP address. This record represents the country where
48       MaxMind believes the IP is located.
49
50   $insights->location()
51       Returns a GeoIP2::Record::Location object representing location data
52       for the requested IP address.
53
54   $insights->maxmind()
55       Returns a GeoIP2::Record::MaxMind object representing data about your
56       MaxMind account.
57
58   $insights->postal()
59       Returns a GeoIP2::Record::Postal object representing postal code data
60       for the requested IP address.
61
62   $insights->registered_country()
63       Returns a GeoIP2::Record::Country object representing the registered
64       country data for the requested IP address. This record represents the
65       country where the ISP has registered a given IP block and may differ
66       from the user's country.
67
68   $insights->represented_country()
69       Returns a GeoIP2::Record::RepresentedCountry object for the country
70       represented by the requested IP address. The represented country may
71       differ from the "country" for things like military bases.
72
73   $insights->subdivisions()
74       Returns an array of GeoIP2::Record::Subdivision objects representing
75       the country subdivisions for the requested IP address. The number and
76       type of subdivisions varies by country, but a subdivision is typically
77       a state, province, county, etc.
78
79       Some countries have multiple levels of subdivisions. For instance, the
80       subdivisions array for Oxford in the United Kingdom would have England
81       as the first element and Oxfordshire as the second element. The
82       subdivisions array for Minneapolis in the United States would have a
83       single object for Minnesota.
84
85       If the response did not contain any subdivisions, this method returns
86       an empty list.
87
88   $insights->most_specific_subdivision()
89       Returns a single GeoIP2::Record::Subdivision object representing the
90       most specific subdivision returned.
91
92       If the response did not contain any subdivisions, this method returns a
93       GeoIP2::Record::Subdivision object with no values.
94
95   $insights->traits()
96       Returns a GeoIP2::Record::Traits object representing the traits for the
97       requested IP address.
98

SUPPORT

100       Bugs may be submitted through
101       <https://github.com/maxmind/GeoIP2-perl/issues>.
102

AUTHORS

104       •   Dave Rolsky <drolsky@maxmind.com>
105
106       •   Greg Oschwald <goschwald@maxmind.com>
107
108       •   Mark Fowler <mfowler@maxmind.com>
109
110       •   Olaf Alders <oalders@maxmind.com>
111
113       This software is copyright (c) 2013 - 2019 by MaxMind, Inc.
114
115       This is free software; you can redistribute it and/or modify it under
116       the same terms as the Perl 5 programming language system itself.
117
118
119
120perl v5.32.1                      2021-01-27        GeoIP2::Model::Insights(3)
Impressum