Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,6 @@ List of supported endpoints
# What travelers think about this hotel?
amadeus.e_reputation.hotel_sentiments.get(hotelIds = 'ADNYCCTB')

# Points of Interest
# What are the popular places in Barcelona (based a geo location and a radius)
amadeus.reference_data.locations.points_of_interest.get(latitude=41.397158, longitude=2.160873)
# What are the popular places in Barcelona? (based on a square)
amadeus.reference_data.locations.points_of_interest.by_square.get(north=41.397158, west=2.160873,
south=41.394582, east=2.177181)
# Returns a single Point of Interest from a given id
amadeus.reference_data.locations.point_of_interest('9CB40CB5D0').get()

# Location Score
amadeus.location.analytics.category_rated_areas.get(latitude=41.397158, longitude=2.160873)

Expand Down
6 changes: 0 additions & 6 deletions amadeus/reference_data/_locations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from amadeus.client.decorator import Decorator
from amadeus.reference_data.locations._airports import Airports
from amadeus.reference_data.locations._points_of_interest import PointsOfInterest
from amadeus.reference_data.locations._point_of_interest import PointOfInterest
from amadeus.reference_data.locations._hotels import Hotels
from amadeus.reference_data.locations._hotel import Hotel
from amadeus.reference_data.locations._cities import Cities
Expand All @@ -11,14 +9,10 @@ class Locations(Decorator, object):
def __init__(self, client):
Decorator.__init__(self, client)
self.airports = Airports(client)
self.points_of_interest = PointsOfInterest(client)
self.hotels = Hotels(client)
self.hotel = Hotel(client)
self.cities = Cities(client)

def point_of_interest(self, poi_id):
return PointOfInterest(self.client, poi_id)

def get(self, **params):
'''
Returns details for a specific airport.
Expand Down
3 changes: 1 addition & 2 deletions amadeus/reference_data/locations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ._airports import Airports
from ._points_of_interest import PointsOfInterest
from ._hotel import Hotel
from ._cities import Cities

__all__ = ['Airports', 'PointsOfInterest', 'Hotel', 'Cities']
__all__ = ['Airports', 'Hotel', 'Cities']
21 changes: 0 additions & 21 deletions amadeus/reference_data/locations/_point_of_interest.py

This file was deleted.

32 changes: 0 additions & 32 deletions amadeus/reference_data/locations/_points_of_interest.py

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions amadeus/reference_data/locations/points_of_interest/_by_square.py

This file was deleted.

12 changes: 0 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,6 @@ ReferenceData/Locations
.. autoclass:: amadeus.reference_data.Airlines
:members: get

ReferenceData/Locations/PointsOfInterest
=======================

.. autoclass:: amadeus.reference_data.locations.PointsOfInterest
:members: get

.. autoclass:: amadeus.reference_data.locations.points_of_interest.BySquare
:members: get

.. autoclass:: amadeus.reference_data.locations.PointOfInterest
:members: get

ReferenceData/Urls
==================

Expand Down
31 changes: 0 additions & 31 deletions specs/namespaces/test_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def test_expected_paths(client):
assert client.reference_data.location is not None
assert client.reference_data.locations is not None
assert client.reference_data.locations.airports is not None
assert client.reference_data.locations.points_of_interest is not None
assert client.reference_data.locations.points_of_interest.by_square \
is not None
assert client.reference_data.locations.hotels is not None
assert client.reference_data.locations.hotels.by_hotels is not None
assert client.reference_data.locations.hotels.by_city is not None
Expand Down Expand Up @@ -70,11 +67,6 @@ def test_expected_get_methods(client):
assert client.reference_data.location('ALHR').get is not None
assert client.reference_data.locations.get is not None
assert client.reference_data.locations.airports.get is not None
assert client.reference_data.locations.points_of_interest.get is not None
assert client.reference_data.locations.points_of_interest.by_square.get \
is not None
assert client.reference_data.locations.point_of_interest('9CB40CB5D0').get \
is not None
assert client.reference_data.recommended_locations.get is not None
assert client.reference_data.locations.hotels.by_city.get is not None
assert client.reference_data.locations.hotels.by_hotels.get is not None
Expand Down Expand Up @@ -151,29 +143,6 @@ def test_reference_data_locations_airports_get(client_setup):
)


def test_reference_data_locations_points_of_interest_get(client_setup):
client_setup.reference_data.locations.points_of_interest.get(a='b')
client_setup.get.assert_called_with(
'/v1/reference-data/locations/pois', a='b'
)


def test_reference_data_locations_points_of_interest_by_square_get(client_setup):
client_setup.reference_data.locations.points_of_interest.by_square.get(
a='b')
client_setup.get.assert_called_with(
'/v1/reference-data/locations/pois/by-square', a='b'
)


def test_reference_data_locations_point_of_interest_get(client_setup):
client_setup.reference_data.locations.point_of_interest(
'XXX').get(a='b')
client_setup.get.assert_called_with(
'/v1/reference-data/locations/pois/XXX', a='b'
)


def test_location_analytics_category_rated_areas_get(client_setup):
client_setup.location.analytics.category_rated_areas.get(a='b')
client_setup.get.assert_called_with(
Expand Down
Loading