Skip to content

Commit a148506

Browse files
authored
Merge pull request #222 from siddydutta/remove-points-of-interest
Remove support for Points of Interest API
2 parents f487a43 + 0138410 commit a148506

File tree

9 files changed

+1
-148
lines changed

9 files changed

+1
-148
lines changed

README.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,6 @@ List of supported endpoints
291291
# What travelers think about this hotel?
292292
amadeus.e_reputation.hotel_sentiments.get(hotelIds = 'ADNYCCTB')
293293
294-
# Points of Interest
295-
# What are the popular places in Barcelona (based a geo location and a radius)
296-
amadeus.reference_data.locations.points_of_interest.get(latitude=41.397158, longitude=2.160873)
297-
# What are the popular places in Barcelona? (based on a square)
298-
amadeus.reference_data.locations.points_of_interest.by_square.get(north=41.397158, west=2.160873,
299-
south=41.394582, east=2.177181)
300-
# Returns a single Point of Interest from a given id
301-
amadeus.reference_data.locations.point_of_interest('9CB40CB5D0').get()
302-
303294
# Location Score
304295
amadeus.location.analytics.category_rated_areas.get(latitude=41.397158, longitude=2.160873)
305296

amadeus/reference_data/_locations.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from amadeus.client.decorator import Decorator
22
from amadeus.reference_data.locations._airports import Airports
3-
from amadeus.reference_data.locations._points_of_interest import PointsOfInterest
4-
from amadeus.reference_data.locations._point_of_interest import PointOfInterest
53
from amadeus.reference_data.locations._hotels import Hotels
64
from amadeus.reference_data.locations._hotel import Hotel
75
from amadeus.reference_data.locations._cities import Cities
@@ -11,14 +9,10 @@ class Locations(Decorator, object):
119
def __init__(self, client):
1210
Decorator.__init__(self, client)
1311
self.airports = Airports(client)
14-
self.points_of_interest = PointsOfInterest(client)
1512
self.hotels = Hotels(client)
1613
self.hotel = Hotel(client)
1714
self.cities = Cities(client)
1815

19-
def point_of_interest(self, poi_id):
20-
return PointOfInterest(self.client, poi_id)
21-
2216
def get(self, **params):
2317
'''
2418
Returns details for a specific airport.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ._airports import Airports
2-
from ._points_of_interest import PointsOfInterest
32
from ._hotel import Hotel
43
from ._cities import Cities
54

6-
__all__ = ['Airports', 'PointsOfInterest', 'Hotel', 'Cities']
5+
__all__ = ['Airports', 'Hotel', 'Cities']

amadeus/reference_data/locations/_point_of_interest.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

amadeus/reference_data/locations/_points_of_interest.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

amadeus/reference_data/locations/points_of_interest/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

amadeus/reference_data/locations/points_of_interest/_by_square.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/index.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,6 @@ ReferenceData/Locations
128128
.. autoclass:: amadeus.reference_data.Airlines
129129
:members: get
130130

131-
ReferenceData/Locations/PointsOfInterest
132-
=======================
133-
134-
.. autoclass:: amadeus.reference_data.locations.PointsOfInterest
135-
:members: get
136-
137-
.. autoclass:: amadeus.reference_data.locations.points_of_interest.BySquare
138-
:members: get
139-
140-
.. autoclass:: amadeus.reference_data.locations.PointOfInterest
141-
:members: get
142-
143131
ReferenceData/Urls
144132
==================
145133

specs/namespaces/test_namespaces.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ def test_expected_paths(client):
1515
assert client.reference_data.location is not None
1616
assert client.reference_data.locations is not None
1717
assert client.reference_data.locations.airports is not None
18-
assert client.reference_data.locations.points_of_interest is not None
19-
assert client.reference_data.locations.points_of_interest.by_square \
20-
is not None
2118
assert client.reference_data.locations.hotels is not None
2219
assert client.reference_data.locations.hotels.by_hotels is not None
2320
assert client.reference_data.locations.hotels.by_city is not None
@@ -70,11 +67,6 @@ def test_expected_get_methods(client):
7067
assert client.reference_data.location('ALHR').get is not None
7168
assert client.reference_data.locations.get is not None
7269
assert client.reference_data.locations.airports.get is not None
73-
assert client.reference_data.locations.points_of_interest.get is not None
74-
assert client.reference_data.locations.points_of_interest.by_square.get \
75-
is not None
76-
assert client.reference_data.locations.point_of_interest('9CB40CB5D0').get \
77-
is not None
7870
assert client.reference_data.recommended_locations.get is not None
7971
assert client.reference_data.locations.hotels.by_city.get is not None
8072
assert client.reference_data.locations.hotels.by_hotels.get is not None
@@ -151,29 +143,6 @@ def test_reference_data_locations_airports_get(client_setup):
151143
)
152144

153145

154-
def test_reference_data_locations_points_of_interest_get(client_setup):
155-
client_setup.reference_data.locations.points_of_interest.get(a='b')
156-
client_setup.get.assert_called_with(
157-
'/v1/reference-data/locations/pois', a='b'
158-
)
159-
160-
161-
def test_reference_data_locations_points_of_interest_by_square_get(client_setup):
162-
client_setup.reference_data.locations.points_of_interest.by_square.get(
163-
a='b')
164-
client_setup.get.assert_called_with(
165-
'/v1/reference-data/locations/pois/by-square', a='b'
166-
)
167-
168-
169-
def test_reference_data_locations_point_of_interest_get(client_setup):
170-
client_setup.reference_data.locations.point_of_interest(
171-
'XXX').get(a='b')
172-
client_setup.get.assert_called_with(
173-
'/v1/reference-data/locations/pois/XXX', a='b'
174-
)
175-
176-
177146
def test_location_analytics_category_rated_areas_get(client_setup):
178147
client_setup.location.analytics.category_rated_areas.get(a='b')
179148
client_setup.get.assert_called_with(

0 commit comments

Comments
 (0)