1GeoIP2::Record::ContineUnste(r3)Contributed Perl DocumenGteaotIiPo2n::Record::Continent(3)
2
3
4

NAME

6       GeoIP2::Record::Continent - Contains data for the continent record
7       associated with an IP address
8

VERSION

10       version 2.006002
11

SYNOPSIS

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

DESCRIPTION

28       This class contains the continent-level data associated with an IP
29       address.
30
31       This record is returned by all the end points.
32

METHODS

34       This class provides the following methods:
35
36   $continent_rec->code()
37       This returns a two character continent code like "NA" (North America)
38       or "OC" (Oceania).
39
40       This attribute is returned by all end points.
41
42   $continent_rec->geoname_id()
43       This returns a "geoname_id" for the continent.
44
45       This attribute is returned by all end points.
46
47   $continent_rec->name()
48       This returns a name for the continent. The locale chosen depends on the
49       "locales" argument that was passed to the record's constructor. This
50       will be passed through from the GeoIP2::WebService::Client object you
51       used to fetch the data that populated this record.
52
53       If the record does not have a name in any of the locales you asked for,
54       this method returns "undef".
55
56       This attribute is returned by all end points.
57
58   $continent_rec->names()
59       This returns a hash reference where the keys are locale codes and the
60       values are names. See GeoIP2::WebService::Client for a list of the
61       possible locale codes.
62
63       This attribute is returned by all end points.
64

SUPPORT

66       Bugs may be submitted through
67       <https://github.com/maxmind/GeoIP2-perl/issues>.
68

AUTHORS

70       •   Dave Rolsky <drolsky@maxmind.com>
71
72       •   Greg Oschwald <goschwald@maxmind.com>
73
74       •   Mark Fowler <mfowler@maxmind.com>
75
76       •   Olaf Alders <oalders@maxmind.com>
77
79       This software is copyright (c) 2013 - 2019 by MaxMind, Inc.
80
81       This is free software; you can redistribute it and/or modify it under
82       the same terms as the Perl 5 programming language system itself.
83
84
85
86perl v5.32.1                      2021-01-27      GeoIP2::Record::Continent(3)
Impressum