Skip to content

Commit 7d0fc0f

Browse files
committed
Removed mention of embassies + other doc cleanup
1 parent 7ff5ce8 commit 7d0fc0f

File tree

2 files changed

+35
-68
lines changed

2 files changed

+35
-68
lines changed

geoip2/models.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class Country(object):
5151
5252
Object for the country represented by the users of the IP address
5353
when that country is different than the country in ``country``. For
54-
instance, the country represented by an overseas military base or
55-
embassy.
54+
instance, the country represented by an overseas military base.
5655
5756
:type: :py:class:`geoip2.records.RepresentedCountry`
5857
@@ -134,8 +133,7 @@ class City(Country):
134133
135134
Object for the country represented by the users of the IP address
136135
when that country is different than the country in ``country``. For
137-
instance, the country represented by an overseas military base or
138-
embassy.
136+
instance, the country represented by an overseas military base.
139137
140138
:type: :py:class:`geoip2.records.RepresentedCountry`
141139
@@ -212,8 +210,7 @@ class Insights(City):
212210
213211
Object for the country represented by the users of the IP address
214212
when that country is different than the country in ``country``. For
215-
instance, the country represented by an overseas military base or
216-
embassy.
213+
instance, the country represented by an overseas military base.
217214
218215
:type: :py:class:`geoip2.records.RepresentedCountry`
219216

geoip2/records.py

Lines changed: 32 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class City(PlaceRecord):
5050
5151
This class contains the city-level data associated with an IP address.
5252
53-
This record is returned by all the end points except the Country end point.
53+
This record is returned by ``city`` and ``insights``.
5454
5555
Attributes:
5656
@@ -64,22 +64,21 @@ class City(PlaceRecord):
6464
6565
.. attribute:: geoname_id
6666
67-
The GeoName ID for the city. This attribute is returned by all end
68-
points.
67+
The GeoName ID for the city.
6968
7069
:type: int
7170
7271
.. attribute:: name
7372
7473
The name of the city based on the locales list passed to the
75-
constructor. This attribute is returned by all end points.
74+
constructor.
7675
7776
:type: unicode
7877
7978
.. attribute:: names
8079
8180
A dictionary where the keys are locale codes
82-
and the values are names. This attribute is returned by all end points.
81+
and the values are names.
8382
8483
:type: dict
8584
@@ -94,36 +93,33 @@ class Continent(PlaceRecord):
9493
This class contains the continent-level data associated with an IP
9594
address.
9695
97-
This record is returned by all the end points.
98-
9996
Attributes:
10097
10198
10299
.. attribute:: code
103100
104101
A two character continent code like "NA" (North America)
105-
or "OC" (Oceania). This attribute is returned by all end points.
102+
or "OC" (Oceania).
106103
107104
:type: unicode
108105
109106
.. attribute:: geoname_id
110107
111-
The GeoName ID for the continent. This
112-
attribute is returned by all end points.
108+
The GeoName ID for the continent.
113109
114110
:type: int
115111
116112
.. attribute:: name
117113
118114
Returns the name of the continent based on the locales list passed to
119-
the constructor. This attribute is returned by all end points.
115+
the constructor.
120116
121117
:type: unicode
122118
123119
.. attribute:: names
124120
125121
A dictionary where the keys are locale codes
126-
and the values are names. This attribute is returned by all end points.
122+
and the values are names.
127123
128124
:type: dict
129125
@@ -137,8 +133,6 @@ class Country(PlaceRecord):
137133
138134
This class contains the country-level data associated with an IP address.
139135
140-
This record is returned by all the end points.
141-
142136
Attributes:
143137
144138
@@ -152,30 +146,29 @@ class Country(PlaceRecord):
152146
153147
.. attribute:: geoname_id
154148
155-
The GeoName ID for the country. This attribute is
156-
returned by all end points.
149+
The GeoName ID for the country.
157150
158151
:type: int
159152
160153
.. attribute:: iso_code
161154
162155
The two-character `ISO 3166-1
163156
<http://en.wikipedia.org/wiki/ISO_3166-1>`_ alpha code for the
164-
country. This attribute is returned by all end points.
157+
country.
165158
166159
:type: unicode
167160
168161
.. attribute:: name
169162
170163
The name of the country based on the locales list passed to the
171-
constructor. This attribute is returned by all end points.
164+
constructor.
172165
173166
:type: unicode
174167
175168
.. attribute:: names
176169
177170
A dictionary where the keys are locale codes and the values
178-
are names. This attribute is returned by all end points.
171+
are names.
179172
180173
:type: dict
181174
@@ -189,9 +182,7 @@ class RepresentedCountry(Country):
189182
190183
This class contains the country-level data associated with an IP address
191184
for the IP's represented country. The represented country is the country
192-
represented by something like a military base or embassy.
193-
194-
This record is returned by all the end points.
185+
represented by something like a military base.
195186
196187
Attributes:
197188
@@ -206,30 +197,28 @@ class RepresentedCountry(Country):
206197
207198
.. attribute:: geoname_id
208199
209-
The GeoName ID for the country. This attribute is
210-
returned by all end points.
200+
The GeoName ID for the country.
211201
212202
:type: int
213203
214204
.. attribute:: iso_code
215205
216206
The two-character `ISO 3166-1
217207
<http://en.wikipedia.org/wiki/ISO_3166-1>`_ alpha code for the country.
218-
This attribute is returned by all end points.
219208
220209
:type: unicode
221210
222211
.. attribute:: name
223212
224213
The name of the country based on the locales list passed to the
225-
constructor. This attribute is returned by all end points.
214+
constructor.
226215
227216
:type: unicode
228217
229218
.. attribute:: names
230219
231220
A dictionary where the keys are locale codes and the values
232-
are names. This attribute is returned by all end points.
221+
are names.
233222
234223
:type: dict
235224
@@ -238,8 +227,7 @@ class RepresentedCountry(Country):
238227
239228
A string indicating the type of entity that is representing the
240229
country. Currently we only return ``military`` but this could expand to
241-
include other types such as ``embassy`` in the future. Returned by all
242-
endpoints.
230+
include other types in the future.
243231
244232
:type: unicode
245233
@@ -254,7 +242,7 @@ class Location(Record):
254242
255243
This class contains the location data associated with an IP address.
256244
257-
This record is returned by all the end points except the Country end point.
245+
This record is returned by `city` and `insights`.
258246
259247
Attributes:
260248
@@ -268,18 +256,15 @@ class Location(Record):
268256
269257
.. attribute:: latitude
270258
271-
The latitude of the location as a floating
272-
point number. This attribute is returned by all end points except the
273-
Country end point.
259+
The latitude of the location as a floating point number.
274260
275261
:type: float
276262
277263
278264
.. attribute:: longitude
279265
280266
The longitude of the location as a
281-
floating point number. This attribute is returned by all end points
282-
except the Country end point.
267+
floating point number.
283268
284269
:type: float
285270
@@ -289,17 +274,14 @@ class Location(Record):
289274
location is in the US. MaxMind returns the same metro codes as the
290275
`Google AdWords API
291276
<https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions>`_.
292-
This attribute is returned by all end points except the Country end
293-
point.
294277
295278
:type: int
296279
297280
.. attribute:: time_zone
298281
299282
The time zone associated with location, as
300283
specified by the `IANA Time Zone Database
301-
<http://www.iana.org/time-zones>`_, e.g., "America/New_York". This
302-
attribute is returned by all end points except the Country end point.
284+
<http://www.iana.org/time-zones>`_, e.g., "America/New_York".
303285
304286
:type: unicode
305287
@@ -313,8 +295,6 @@ class MaxMind(Record):
313295

314296
"""Contains data related to your MaxMind account
315297
316-
This record is returned by all the end points.
317-
318298
Attributes:
319299
320300
.. attribute:: queries_remaining
@@ -334,16 +314,15 @@ class Postal(Record):
334314
335315
This class contains the postal data associated with an IP address.
336316
337-
This record is returned by all the end points except the Country end point.
317+
This attribute is returned by ``city`` and ``insights``.
338318
339319
Attributes:
340320
341321
.. attribute:: code
342322
343323
The postal code of the location. Postal
344324
codes are not available for all countries. In some countries, this will
345-
only contain part of the postal code. This attribute is returned by all
346-
end points except the Country end point.
325+
only contain part of the postal code.
347326
348327
:type: unicode
349328
@@ -365,7 +344,7 @@ class Subdivision(PlaceRecord):
365344
366345
This class contains the subdivision data associated with an IP address.
367346
368-
This record is returned by all the end points except the Country end point.
347+
This attribute is returned by ``city`` and ``insights``.
369348
370349
Attributes:
371350
@@ -379,32 +358,29 @@ class Subdivision(PlaceRecord):
379358
380359
.. attribute:: geoname_id
381360
382-
This is a GeoName ID for the subdivision. This
383-
attribute is returned by all end points except Country.
361+
This is a GeoName ID for the subdivision.
384362
385363
:type: int
386364
387365
.. attribute:: iso_code
388366
389367
This is a string up to three characters long
390368
contain the subdivision portion of the `ISO 3166-2 code
391-
<http://en.wikipedia.org/wiki/ISO_3166-2>`_. This attribute is
392-
returned by all end points except Country.
369+
<http://en.wikipedia.org/wiki/ISO_3166-2>`_.
393370
394371
:type: unicode
395372
396373
.. attribute:: name
397374
398375
The name of the subdivision based on the locales list passed to the
399-
constructor. This attribute is returned by all end points.
376+
constructor.
400377
401378
:type: unicode
402379
403380
.. attribute:: names
404381
405382
A dictionary where the keys are locale codes and the
406-
values are names. This attribute is returned by all end points except
407-
Country.
383+
values are names
408384
409385
:type: dict
410386
@@ -422,9 +398,7 @@ class Subdivisions(tuple):
422398
For instance, the response for Oxford in the United Kingdom would have
423399
England as the first element and Oxfordshire as the second element.
424400
425-
This collection is returned by all the end points except the Country
426-
end point.
427-
401+
This attribute is returned by ``city`` and ``insights``.
428402
"""
429403
# pylint:disable=W0142
430404
def __new__(cls, locales, *subdivisions):
@@ -457,8 +431,6 @@ class Traits(Record):
457431
458432
This class contains the traits data associated with an IP address.
459433
460-
This record is returned by all the end points.
461-
462434
This class has the following attributes:
463435
464436
@@ -495,24 +467,22 @@ class Traits(Record):
495467
is for. If you performed a "me" lookup against the web service, this
496468
will be the externally routable IP address for the system the code is
497469
running on. If the system is behind a NAT, this may differ from the IP
498-
address locally assigned to it. This attribute is returned by all end
499-
points.
470+
address locally assigned to it.
500471
501472
:type: unicode
502473
503474
.. attribute:: is_anonymous_proxy
504475
505476
This is true if the IP is an anonymous
506477
proxy. See http://dev.maxmind.com/faq/geoip#anonproxy for further
507-
details. This attribute is returned by all end points.
478+
details.
508479
509480
:type: bool
510481
511482
.. attribute:: is_satellite_provider
512483
513484
This is true if the IP address is from a satellite provider that
514-
provides service to multiple countries. This attribute is returned
515-
by all end points.
485+
provides service to multiple countries.
516486
517487
:type: bool
518488

0 commit comments

Comments
 (0)