IPinfo 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4c7edbf9ea00bfe0f34278ce345a0be0af732787dac8894043640d1c72f3dda
4
- data.tar.gz: a012b52f9d182417c48f96997e80464b37633b46b0e54e2251b36c8d36710174
3
+ metadata.gz: dd107edec906894bab2445a4d7bc9b551fc79778c7b941a2dfa486d32c969e47
4
+ data.tar.gz: 1a67c2f0a6c7bbb57209982e1c1e92868aa218deec445826cef2f5ecb91eac5d
5
5
  SHA512:
6
- metadata.gz: 706d928db455afb05db71bbf170b33616fa141c3f5765ac1045563e24b90e124fd8fbb9743bcdd7ac9b0ba1a7d0ccf30a4615cb2edf0fefe55e5c903f9be8eac
7
- data.tar.gz: f49d989cf52c9b1524ce2d4a177cc906ab5c680745fb23f540fa6395c31f6a4bac304f904849f0b8298a89600e93321a2f6e0165988506f8ad0ede81c7873ad1
6
+ metadata.gz: fe484b50604b7ce3dd70aa8cddc0165b0416b358933ef932d2bd93d83587ab6b4892e4e721be2ca53687cba8bc6c849cd9aab67c1aff11e69fd022d62a26faf1
7
+ data.tar.gz: b934e0bb1291651ebffe1628ae344294f4a7be1e6ba6c9354eaf9770f8c218e6209df843e2d4d891cd6bce35aee1c090c880fda2e850e0727ee87e954b2d6fd9
@@ -0,0 +1,34 @@
1
+ name: Release package to rubygems.org
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish:
10
+
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v3
16
+
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+
20
+ - name: Install dependencies
21
+ run: bundle install
22
+
23
+ - name: Run tests
24
+ run: bundle exec rake
25
+ env:
26
+ IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
27
+
28
+ - name: Build
29
+ run: gem build *.gemspec
30
+
31
+ - name: Publish
32
+ run: gem push *.gem
33
+ env:
34
+ GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
@@ -0,0 +1,31 @@
1
+ name: Unit Tests
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ run:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['3.1', '3.0', '2.7', '2.6']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+
25
+ - name: Install dependencies
26
+ run: bundle install
27
+
28
+ - name: Run tests
29
+ env:
30
+ IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
31
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -40,3 +40,9 @@ Style/MethodCallWithArgsParentheses:
40
40
 
41
41
  Style/MethodCallWithoutArgsParentheses:
42
42
  Enabled: false
43
+
44
+ Naming/FileName:
45
+ Enabled: false
46
+
47
+ Naming/PredicateName:
48
+ Enabled: false
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # [<img src="https://ipinfo.io/static/ipinfo-small.svg" alt="IPinfo" width="24"/>](https://ipinfo.io/) IPinfo Ruby Client Library
2
2
 
3
- This is the official Ruby client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to lookup your own IP address, or get any of the following details for an IP:
4
- - [IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude and longitude)
5
- - [ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting or company)
3
+ This is the official Ruby client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to look up your own IP address, or get any of the following details for an IP:
4
+ - [IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
5
+ - [ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
6
6
  - [Firmographic data](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
7
7
  - [Carrier details](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
8
8
 
@@ -10,7 +10,7 @@ Check all the data we have for your IP address [here](https://ipinfo.io/what-is-
10
10
 
11
11
  ### Getting Started
12
12
 
13
- You'll need an IPinfo API access token, which you can get by singing up for a free account at [https://ipinfo.io/signup](https://ipinfo.io/signup).
13
+ You'll need an IPinfo API access token, which you can get by signing up for a free account at [https://ipinfo.io/signup](https://ipinfo.io/signup).
14
14
 
15
15
  The free plan is limited to 50,000 requests per month, and doesn't include some of the data fields such as IP type and company data. To enable all the data fields and additional request volumes see [https://ipinfo.io/pricing](https://ipinfo.io/pricing)
16
16
 
@@ -33,7 +33,7 @@ Or install it yourself as:
33
33
  #### Quick Start
34
34
 
35
35
  ```ruby
36
- require 'IPinfo'
36
+ require 'ipinfo'
37
37
 
38
38
  access_token = '123456789abc'
39
39
  handler = IPinfo::create(access_token)
@@ -44,6 +44,18 @@ city = details.city # Emeryville
44
44
  loc = details.loc # 37.8342,-122.2900
45
45
  ```
46
46
 
47
+ ##### Note about Rails 6+
48
+
49
+ If using this package in Rails 6+, the Zeitwerk auto-loader may not properly
50
+ recognize the gem due to its naming conventions (uppercased gem/module name).
51
+ See issue https://github.com/ipinfo/ruby/issues/24.
52
+
53
+ A workaround is to insert this in `application.rb`:
54
+
55
+ ```ruby
56
+ require 'ipinfo' unless defined?(IPinfo)
57
+ ```
58
+
47
59
  #### Usage
48
60
 
49
61
  The `IPinfo.details()` method accepts an IP address as an optional, positional
@@ -51,7 +63,7 @@ argument. If no IP address is specified, the API will return data for the IP
51
63
  address from which it receives the request.
52
64
 
53
65
  ```ruby
54
- require 'IPinfo'
66
+ require 'ipinfo'
55
67
 
56
68
  access_token = '123456789abc'
57
69
  handler = IPinfo::create(access_token)
@@ -86,16 +98,74 @@ hostname = details.hostname # cpe-104-175-221-247.socal.res.rr.com
86
98
 
87
99
  `details.country_name` will return the country name, as supplied by the
88
100
  `countries.json` file. See below for instructions on changing that file for use
89
- with non-English languages. `details.country` will still return country code.
101
+ with non-English languages. `details.country` will still return the country code.
90
102
 
91
103
  ```ruby
92
104
  country = details.country # US
93
105
  country_name = details.country_name # United States
94
106
  ```
95
107
 
108
+ ##### European Union (EU) Country
109
+
110
+ `details.is_eu` will return `true` if the country is a member of the European Union (EU), as supplied by the `eu.json` file.
111
+
112
+ ```ruby
113
+ is_eu = details.is_eu # false
114
+ ```
115
+
116
+ It is possible to change the file by setting the `eu_countries` setting when creating the `IPinfo` object.
117
+
118
+ The file must be a `.json` file with the [following structure](lib/ipinfo/eu.json).
119
+
120
+ ##### Country Flag
121
+
122
+ `details.country_flag` will return `emoji` and `unicode` of a country's flag, as supplied by the `eu.json` file.
123
+
124
+ ```ruby
125
+ country_flag = details.country_flag # {"emoji"=>"🇺🇸", "unicode"=>"U+1F1FA U+1F1F8"}
126
+ country_flag_emoji = details.country_flag['emoji'] # 🇺🇸
127
+ country_flag_unicode = details.country_flag['unicode'] # U+1F1FA U+1F1F8
128
+ ```
129
+
130
+ ##### Country Flag URL
131
+
132
+ `details.country_flag_url` will return a public link to the country's flag image as an SVG which can be used anywhere.
133
+
134
+ ```ruby
135
+ country_flag = details.country_flag_url # {"https://cdn.ipinfo.io/static/images/countries-flags/US.svg"}
136
+ ```
137
+
138
+ ##### Country Currency
139
+
140
+ `details.country_currency` will return `code` and `symbol` of a country's currency, as supplied by the `currency.json` file.
141
+
142
+ ```ruby
143
+ country_currency = details.country_currency # {"code"=>"USD", "symbol"=>"$"}
144
+ country_currency_code = details.country_currency['code'] # USD
145
+ country_currency_symbol = details.country_currency['symbol'] # $
146
+ ```
147
+
148
+ It is possible to change the file by setting the `countries_currencies` setting when creating the `IPinfo` object.
149
+
150
+ The file must be a `.json` file with the [following structure](lib/ipinfo/currency.json).
151
+
152
+ ##### Continent
153
+
154
+ `details.continent` will return `code` and `name` of the continent, as supplied by the `continent.json` file.
155
+
156
+ ```ruby
157
+ continent = details.continent # {"code"=>"NA", "name"=>"North America"}
158
+ continent_code = details.continent['code'] # NA
159
+ continent_name = details.continent['name'] # North America
160
+ ```
161
+
162
+ It is possible to change the file by setting the `continents` setting when creating the `IPinfo` object.
163
+
164
+ The file must be a `.json` file with the [following structure](lib/ipinfo/continent.json).
165
+
96
166
  #### IP Address
97
167
 
98
- `details.ip_address` will return the an `IPAddr` object from the
168
+ `details.ip_address` will return the `IPAddr` object from the
99
169
  [Ruby Standard Library](https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html).
100
170
  `details.ip` will still return a string.
101
171
 
@@ -217,10 +287,10 @@ The file must be a `.json` file with the following structure:
217
287
 
218
288
  ### Other Libraries
219
289
 
220
- There are official IPinfo client libraries available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails and Laravel. There are also many third party libraries and integrations available for our API.
290
+ There are official IPinfo client libraries available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails, and Laravel. There are also many third-party libraries and integrations available for our API.
221
291
 
222
292
  ### About IPinfo
223
293
 
224
- Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, privacy detection, reverse IP, and IP type data sets. Our API handles over 20 billion requests a month for 100,000 businesses and developers.
294
+ Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, VPN detection, hosted domains, and IP type data sets. Our API handles over 40 billion requests a month for 100,000 businesses and developers.
225
295
 
226
296
  [![image](https://avatars3.githubusercontent.com/u/15721521?s=128&u=7bb7dde5c4991335fb234e68a30971944abc6bf3&v=4)](https://ipinfo.io/)
data/ipinfo.gemspec CHANGED
@@ -16,16 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.description = ' This is a ruby wrapper for http://ipinfo.io. '
17
17
  spec.homepage = 'https://ipinfo.io'
18
18
 
19
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the
20
- # 'allowed_push_host' to allow pushing to a single host or delete this
21
- # section to allow pushing to any host.
22
- if spec.respond_to?(:metadata)
23
- # spec.metadata['allowed_push_host'] = "http://mygemserver.com'"
24
- else
25
- raise 'RubyGems 2.0 or newer is required to protect against ' \
26
- 'public gem pushes.'
27
- end
28
-
29
19
  spec.add_runtime_dependency 'faraday', '~> 1.0'
30
20
  spec.add_runtime_dependency 'json', '~> 2.1'
31
21
  spec.add_runtime_dependency 'lru_redux', '~> 1.1'
@@ -23,6 +23,13 @@ class IPinfo::Adapter
23
23
  end
24
24
  end
25
25
 
26
+ def post(uri, body, timeout = 2)
27
+ @conn.post(uri) do |req|
28
+ req.body = body
29
+ req.options.timeout = timeout
30
+ end
31
+ end
32
+
26
33
  private
27
34
 
28
35
  attr_reader :token
@@ -35,7 +42,7 @@ class IPinfo::Adapter
35
42
 
36
43
  def default_headers
37
44
  headers = {
38
- 'User-Agent' => 'IPinfoClient/Ruby/1.0',
45
+ 'User-Agent' => 'IPinfoClient/Ruby/1.1.0',
39
46
  'Accept' => 'application/json'
40
47
  }
41
48
  headers['Authorization'] = "Bearer #{CGI.escape(token)}" if token
@@ -0,0 +1,252 @@
1
+ {
2
+ "BD": {"code": "AS", "name": "Asia"},
3
+ "BE": {"code": "EU", "name": "Europe"},
4
+ "BF": {"code": "AF", "name": "Africa"},
5
+ "BG": {"code": "EU", "name": "Europe"},
6
+ "BA": {"code": "EU", "name": "Europe"},
7
+ "BB": {"code": "NA", "name": "North America"},
8
+ "WF": {"code": "OC", "name": "Oceania"},
9
+ "BL": {"code": "NA", "name": "North America"},
10
+ "BM": {"code": "NA", "name": "North America"},
11
+ "BN": {"code": "AS", "name": "Asia"},
12
+ "BO": {"code": "SA", "name": "South America"},
13
+ "BH": {"code": "AS", "name": "Asia"},
14
+ "BI": {"code": "AF", "name": "Africa"},
15
+ "BJ": {"code": "AF", "name": "Africa"},
16
+ "BT": {"code": "AS", "name": "Asia"},
17
+ "JM": {"code": "NA", "name": "North America"},
18
+ "BV": {"code": "AN", "name": "Antarctica"},
19
+ "BW": {"code": "AF", "name": "Africa"},
20
+ "WS": {"code": "OC", "name": "Oceania"},
21
+ "BQ": {"code": "NA", "name": "North America"},
22
+ "BR": {"code": "SA", "name": "South America"},
23
+ "BS": {"code": "NA", "name": "North America"},
24
+ "JE": {"code": "EU", "name": "Europe"},
25
+ "BY": {"code": "EU", "name": "Europe"},
26
+ "BZ": {"code": "NA", "name": "North America"},
27
+ "RU": {"code": "EU", "name": "Europe"},
28
+ "RW": {"code": "AF", "name": "Africa"},
29
+ "RS": {"code": "EU", "name": "Europe"},
30
+ "TL": {"code": "OC", "name": "Oceania"},
31
+ "RE": {"code": "AF", "name": "Africa"},
32
+ "TM": {"code": "AS", "name": "Asia"},
33
+ "TJ": {"code": "AS", "name": "Asia"},
34
+ "RO": {"code": "EU", "name": "Europe"},
35
+ "TK": {"code": "OC", "name": "Oceania"},
36
+ "GW": {"code": "AF", "name": "Africa"},
37
+ "GU": {"code": "OC", "name": "Oceania"},
38
+ "GT": {"code": "NA", "name": "North America"},
39
+ "GS": {"code": "AN", "name": "Antarctica"},
40
+ "GR": {"code": "EU", "name": "Europe"},
41
+ "GQ": {"code": "AF", "name": "Africa"},
42
+ "GP": {"code": "NA", "name": "North America"},
43
+ "JP": {"code": "AS", "name": "Asia"},
44
+ "GY": {"code": "SA", "name": "South America"},
45
+ "GG": {"code": "EU", "name": "Europe"},
46
+ "GF": {"code": "SA", "name": "South America"},
47
+ "GE": {"code": "AS", "name": "Asia"},
48
+ "GD": {"code": "NA", "name": "North America"},
49
+ "GB": {"code": "EU", "name": "Europe"},
50
+ "GA": {"code": "AF", "name": "Africa"},
51
+ "SV": {"code": "NA", "name": "North America"},
52
+ "GN": {"code": "AF", "name": "Africa"},
53
+ "GM": {"code": "AF", "name": "Africa"},
54
+ "GL": {"code": "NA", "name": "North America"},
55
+ "GI": {"code": "EU", "name": "Europe"},
56
+ "GH": {"code": "AF", "name": "Africa"},
57
+ "OM": {"code": "AS", "name": "Asia"},
58
+ "TN": {"code": "AF", "name": "Africa"},
59
+ "JO": {"code": "AS", "name": "Asia"},
60
+ "HR": {"code": "EU", "name": "Europe"},
61
+ "HT": {"code": "NA", "name": "North America"},
62
+ "HU": {"code": "EU", "name": "Europe"},
63
+ "HK": {"code": "AS", "name": "Asia"},
64
+ "HN": {"code": "NA", "name": "North America"},
65
+ "HM": {"code": "AN", "name": "Antarctica"},
66
+ "VE": {"code": "SA", "name": "South America"},
67
+ "PR": {"code": "NA", "name": "North America"},
68
+ "PS": {"code": "AS", "name": "Asia"},
69
+ "PW": {"code": "OC", "name": "Oceania"},
70
+ "PT": {"code": "EU", "name": "Europe"},
71
+ "SJ": {"code": "EU", "name": "Europe"},
72
+ "PY": {"code": "SA", "name": "South America"},
73
+ "IQ": {"code": "AS", "name": "Asia"},
74
+ "PA": {"code": "NA", "name": "North America"},
75
+ "PF": {"code": "OC", "name": "Oceania"},
76
+ "PG": {"code": "OC", "name": "Oceania"},
77
+ "PE": {"code": "SA", "name": "South America"},
78
+ "PK": {"code": "AS", "name": "Asia"},
79
+ "PH": {"code": "AS", "name": "Asia"},
80
+ "PN": {"code": "OC", "name": "Oceania"},
81
+ "PL": {"code": "EU", "name": "Europe"},
82
+ "PM": {"code": "NA", "name": "North America"},
83
+ "ZM": {"code": "AF", "name": "Africa"},
84
+ "EH": {"code": "AF", "name": "Africa"},
85
+ "EE": {"code": "EU", "name": "Europe"},
86
+ "EG": {"code": "AF", "name": "Africa"},
87
+ "ZA": {"code": "AF", "name": "Africa"},
88
+ "EC": {"code": "SA", "name": "South America"},
89
+ "IT": {"code": "EU", "name": "Europe"},
90
+ "VN": {"code": "AS", "name": "Asia"},
91
+ "SB": {"code": "OC", "name": "Oceania"},
92
+ "ET": {"code": "AF", "name": "Africa"},
93
+ "SO": {"code": "AF", "name": "Africa"},
94
+ "ZW": {"code": "AF", "name": "Africa"},
95
+ "SA": {"code": "AS", "name": "Asia"},
96
+ "ES": {"code": "EU", "name": "Europe"},
97
+ "ER": {"code": "AF", "name": "Africa"},
98
+ "ME": {"code": "EU", "name": "Europe"},
99
+ "MD": {"code": "EU", "name": "Europe"},
100
+ "MG": {"code": "AF", "name": "Africa"},
101
+ "MF": {"code": "NA", "name": "North America"},
102
+ "MA": {"code": "AF", "name": "Africa"},
103
+ "MC": {"code": "EU", "name": "Europe"},
104
+ "UZ": {"code": "AS", "name": "Asia"},
105
+ "MM": {"code": "AS", "name": "Asia"},
106
+ "ML": {"code": "AF", "name": "Africa"},
107
+ "MO": {"code": "AS", "name": "Asia"},
108
+ "MN": {"code": "AS", "name": "Asia"},
109
+ "MH": {"code": "OC", "name": "Oceania"},
110
+ "MK": {"code": "EU", "name": "Europe"},
111
+ "MU": {"code": "AF", "name": "Africa"},
112
+ "MT": {"code": "EU", "name": "Europe"},
113
+ "MW": {"code": "AF", "name": "Africa"},
114
+ "MV": {"code": "AS", "name": "Asia"},
115
+ "MQ": {"code": "NA", "name": "North America"},
116
+ "MP": {"code": "OC", "name": "Oceania"},
117
+ "MS": {"code": "NA", "name": "North America"},
118
+ "MR": {"code": "AF", "name": "Africa"},
119
+ "IM": {"code": "EU", "name": "Europe"},
120
+ "UG": {"code": "AF", "name": "Africa"},
121
+ "TZ": {"code": "AF", "name": "Africa"},
122
+ "MY": {"code": "AS", "name": "Asia"},
123
+ "MX": {"code": "NA", "name": "North America"},
124
+ "IL": {"code": "AS", "name": "Asia"},
125
+ "FR": {"code": "EU", "name": "Europe"},
126
+ "IO": {"code": "AS", "name": "Asia"},
127
+ "SH": {"code": "AF", "name": "Africa"},
128
+ "FI": {"code": "EU", "name": "Europe"},
129
+ "FJ": {"code": "OC", "name": "Oceania"},
130
+ "FK": {"code": "SA", "name": "South America"},
131
+ "FM": {"code": "OC", "name": "Oceania"},
132
+ "FO": {"code": "EU", "name": "Europe"},
133
+ "NI": {"code": "NA", "name": "North America"},
134
+ "NL": {"code": "EU", "name": "Europe"},
135
+ "NO": {"code": "EU", "name": "Europe"},
136
+ "NA": {"code": "AF", "name": "Africa"},
137
+ "VU": {"code": "OC", "name": "Oceania"},
138
+ "NC": {"code": "OC", "name": "Oceania"},
139
+ "NE": {"code": "AF", "name": "Africa"},
140
+ "NF": {"code": "OC", "name": "Oceania"},
141
+ "NG": {"code": "AF", "name": "Africa"},
142
+ "NZ": {"code": "OC", "name": "Oceania"},
143
+ "NP": {"code": "AS", "name": "Asia"},
144
+ "NR": {"code": "OC", "name": "Oceania"},
145
+ "NU": {"code": "OC", "name": "Oceania"},
146
+ "CK": {"code": "OC", "name": "Oceania"},
147
+ "XK": {"code": "EU", "name": "Europe"},
148
+ "CI": {"code": "AF", "name": "Africa"},
149
+ "CH": {"code": "EU", "name": "Europe"},
150
+ "CO": {"code": "SA", "name": "South America"},
151
+ "CN": {"code": "AS", "name": "Asia"},
152
+ "CM": {"code": "AF", "name": "Africa"},
153
+ "CL": {"code": "SA", "name": "South America"},
154
+ "CC": {"code": "AS", "name": "Asia"},
155
+ "CA": {"code": "NA", "name": "North America"},
156
+ "CG": {"code": "AF", "name": "Africa"},
157
+ "CF": {"code": "AF", "name": "Africa"},
158
+ "CD": {"code": "AF", "name": "Africa"},
159
+ "CZ": {"code": "EU", "name": "Europe"},
160
+ "CY": {"code": "EU", "name": "Europe"},
161
+ "CX": {"code": "AS", "name": "Asia"},
162
+ "CR": {"code": "NA", "name": "North America"},
163
+ "CW": {"code": "NA", "name": "North America"},
164
+ "CV": {"code": "AF", "name": "Africa"},
165
+ "CU": {"code": "NA", "name": "North America"},
166
+ "SZ": {"code": "AF", "name": "Africa"},
167
+ "SY": {"code": "AS", "name": "Asia"},
168
+ "SX": {"code": "NA", "name": "North America"},
169
+ "KG": {"code": "AS", "name": "Asia"},
170
+ "KE": {"code": "AF", "name": "Africa"},
171
+ "SS": {"code": "AF", "name": "Africa"},
172
+ "SR": {"code": "SA", "name": "South America"},
173
+ "KI": {"code": "OC", "name": "Oceania"},
174
+ "KH": {"code": "AS", "name": "Asia"},
175
+ "KN": {"code": "NA", "name": "North America"},
176
+ "KM": {"code": "AF", "name": "Africa"},
177
+ "ST": {"code": "AF", "name": "Africa"},
178
+ "SK": {"code": "EU", "name": "Europe"},
179
+ "KR": {"code": "AS", "name": "Asia"},
180
+ "SI": {"code": "EU", "name": "Europe"},
181
+ "KP": {"code": "AS", "name": "Asia"},
182
+ "KW": {"code": "AS", "name": "Asia"},
183
+ "SN": {"code": "AF", "name": "Africa"},
184
+ "SM": {"code": "EU", "name": "Europe"},
185
+ "SL": {"code": "AF", "name": "Africa"},
186
+ "SC": {"code": "AF", "name": "Africa"},
187
+ "KZ": {"code": "AS", "name": "Asia"},
188
+ "KY": {"code": "NA", "name": "North America"},
189
+ "SG": {"code": "AS", "name": "Asia"},
190
+ "SE": {"code": "EU", "name": "Europe"},
191
+ "SD": {"code": "AF", "name": "Africa"},
192
+ "DO": {"code": "NA", "name": "North America"},
193
+ "DM": {"code": "NA", "name": "North America"},
194
+ "DJ": {"code": "AF", "name": "Africa"},
195
+ "DK": {"code": "EU", "name": "Europe"},
196
+ "VG": {"code": "NA", "name": "North America"},
197
+ "DE": {"code": "EU", "name": "Europe"},
198
+ "YE": {"code": "AS", "name": "Asia"},
199
+ "DZ": {"code": "AF", "name": "Africa"},
200
+ "US": {"code": "NA", "name": "North America"},
201
+ "UY": {"code": "SA", "name": "South America"},
202
+ "YT": {"code": "AF", "name": "Africa"},
203
+ "UM": {"code": "OC", "name": "Oceania"},
204
+ "LB": {"code": "AS", "name": "Asia"},
205
+ "LC": {"code": "NA", "name": "North America"},
206
+ "LA": {"code": "AS", "name": "Asia"},
207
+ "TV": {"code": "OC", "name": "Oceania"},
208
+ "TW": {"code": "AS", "name": "Asia"},
209
+ "TT": {"code": "NA", "name": "North America"},
210
+ "TR": {"code": "AS", "name": "Asia"},
211
+ "LK": {"code": "AS", "name": "Asia"},
212
+ "LI": {"code": "EU", "name": "Europe"},
213
+ "LV": {"code": "EU", "name": "Europe"},
214
+ "TO": {"code": "OC", "name": "Oceania"},
215
+ "LT": {"code": "EU", "name": "Europe"},
216
+ "LU": {"code": "EU", "name": "Europe"},
217
+ "LR": {"code": "AF", "name": "Africa"},
218
+ "LS": {"code": "AF", "name": "Africa"},
219
+ "TH": {"code": "AS", "name": "Asia"},
220
+ "TF": {"code": "AN", "name": "Antarctica"},
221
+ "TG": {"code": "AF", "name": "Africa"},
222
+ "TD": {"code": "AF", "name": "Africa"},
223
+ "TC": {"code": "NA", "name": "North America"},
224
+ "LY": {"code": "AF", "name": "Africa"},
225
+ "VA": {"code": "EU", "name": "Europe"},
226
+ "VC": {"code": "NA", "name": "North America"},
227
+ "AE": {"code": "AS", "name": "Asia"},
228
+ "AD": {"code": "EU", "name": "Europe"},
229
+ "AG": {"code": "NA", "name": "North America"},
230
+ "AF": {"code": "AS", "name": "Asia"},
231
+ "AI": {"code": "NA", "name": "North America"},
232
+ "VI": {"code": "NA", "name": "North America"},
233
+ "IS": {"code": "EU", "name": "Europe"},
234
+ "IR": {"code": "AS", "name": "Asia"},
235
+ "AM": {"code": "AS", "name": "Asia"},
236
+ "AL": {"code": "EU", "name": "Europe"},
237
+ "AO": {"code": "AF", "name": "Africa"},
238
+ "AQ": {"code": "AN", "name": "Antarctica"},
239
+ "AS": {"code": "OC", "name": "Oceania"},
240
+ "AR": {"code": "SA", "name": "South America"},
241
+ "AU": {"code": "OC", "name": "Oceania"},
242
+ "AT": {"code": "EU", "name": "Europe"},
243
+ "AW": {"code": "NA", "name": "North America"},
244
+ "IN": {"code": "AS", "name": "Asia"},
245
+ "AX": {"code": "EU", "name": "Europe"},
246
+ "AZ": {"code": "AS", "name": "Asia"},
247
+ "IE": {"code": "EU", "name": "Europe"},
248
+ "ID": {"code": "AS", "name": "Asia"},
249
+ "UA": {"code": "EU", "name": "Europe"},
250
+ "QA": {"code": "AS", "name": "Asia"},
251
+ "MZ": {"code": "AF", "name": "Africa"}
252
+ }