diff --git a/README.rst b/README.rst index 93582522..13270e94 100644 --- a/README.rst +++ b/README.rst @@ -291,9 +291,6 @@ List of supported endpoints # What travelers think about this hotel? amadeus.e_reputation.hotel_sentiments.get(hotelIds = 'ADNYCCTB') - # Location Score - amadeus.location.analytics.category_rated_areas.get(latitude=41.397158, longitude=2.160873) - # Trip Purpose Prediction amadeus.travel.predictions.trip_purpose.get(originLocationCode='ATH', destinationLocationCode='MAD', departureDate='2022-11-01', returnDate='2022-11-08') diff --git a/amadeus/location/__init__.py b/amadeus/location/__init__.py deleted file mode 100644 index ec662619..00000000 --- a/amadeus/location/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from ._analytics import Analytics - -__all__ = ['Analytics'] diff --git a/amadeus/location/_analytics.py b/amadeus/location/_analytics.py deleted file mode 100644 index 7e7cde22..00000000 --- a/amadeus/location/_analytics.py +++ /dev/null @@ -1,8 +0,0 @@ -from amadeus.client.decorator import Decorator -from .analytics import CategoryRatedAreas - - -class Analytics(Decorator, object): - def __init__(self, client): - Decorator.__init__(self, client) - self.category_rated_areas = CategoryRatedAreas(client) diff --git a/amadeus/location/analytics/__init__.py b/amadeus/location/analytics/__init__.py deleted file mode 100644 index ee38cfa9..00000000 --- a/amadeus/location/analytics/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from ._category_rated_areas import CategoryRatedAreas - -__all__ = ['CategoryRatedAreas'] diff --git a/amadeus/location/analytics/_category_rated_areas.py b/amadeus/location/analytics/_category_rated_areas.py deleted file mode 100644 index cdf3bd6f..00000000 --- a/amadeus/location/analytics/_category_rated_areas.py +++ /dev/null @@ -1,24 +0,0 @@ -from amadeus.client.decorator import Decorator - - -class CategoryRatedAreas(Decorator, object): - def get(self, **params): - ''' - Gets popularity score for location categories - - .. code-block:: python - - amadeus.location.analytics.category_rated_areas.get( - latitude=41.397158, - longitude=2.160873) - - :param latitude: latitude of geographic location to search around. - For example: ``41.397158`` - :param longitude: longitude of geographic location to search around. - For example: ``2.160873`` - - :rtype: amadeus.Response - :raises amadeus.ResponseError: if the request could not be completed - ''' - return self.client.get('/v1/location/analytics/category-rated-areas', - **params) diff --git a/amadeus/namespaces/_location.py b/amadeus/namespaces/_location.py deleted file mode 100644 index 591ff97c..00000000 --- a/amadeus/namespaces/_location.py +++ /dev/null @@ -1,8 +0,0 @@ -from amadeus.client.decorator import Decorator -from amadeus.location._analytics import Analytics - - -class Location(Decorator, object): - def __init__(self, client): - Decorator.__init__(self, client) - self.analytics = Analytics(client) diff --git a/amadeus/namespaces/core.py b/amadeus/namespaces/core.py index d6b2dd26..61311367 100644 --- a/amadeus/namespaces/core.py +++ b/amadeus/namespaces/core.py @@ -6,7 +6,6 @@ from amadeus.namespaces._booking import Booking from amadeus.namespaces._schedule import Schedule from amadeus.namespaces._analytics import Analytics -from amadeus.namespaces._location import Location from amadeus.namespaces._airline import Airline from amadeus.namespaces._ordering import Ordering @@ -21,6 +20,5 @@ def __init__(self): self.booking = Booking(self) self.schedule = Schedule(self) self.analytics = Analytics(self) - self.location = Location(self) self.airline = Airline(self) self.ordering = Ordering(self) diff --git a/docs/index.rst b/docs/index.rst index d9faefed..cf31ad26 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -216,12 +216,6 @@ Analytics/ItineraryPriceMetrics .. autoclass:: amadeus.analytics.ItineraryPriceMetrics :members: get -Location/Analytics -================ - -.. autoclass:: amadeus.location.analytics.CategoryRatedAreas - :members: get - Airline/Destinations ================ diff --git a/specs/namespaces/test_namespaces.py b/specs/namespaces/test_namespaces.py index 54b7ec97..930f70ce 100644 --- a/specs/namespaces/test_namespaces.py +++ b/specs/namespaces/test_namespaces.py @@ -54,8 +54,6 @@ def test_expected_paths(client): assert client.schedule.flights is not None assert client.analytics is not None assert client.analytics.itinerary_price_metrics is not None - assert client.location is not None - assert client.location.analytics.category_rated_areas is not None assert client.airline.destinations is not None assert client.shopping.transfer_offers is not None assert client.ordering.transfer_orders is not None @@ -90,7 +88,6 @@ def test_expected_get_methods(client): assert client.booking.flight_order('123').delete is not None assert client.schedule.flights.get is not None assert client.analytics.itinerary_price_metrics.get is not None - assert client.location.analytics.category_rated_areas.get is not None assert client.airline.destinations.get is not None @@ -143,13 +140,6 @@ def test_reference_data_locations_airports_get(client_setup): ) -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( - '/v1/location/analytics/category-rated-areas', a='b' - ) - - def test_reference_data_recommended_locations_get(client_setup): client_setup.reference_data.recommended_locations.get(a='b') client_setup.get.assert_called_with(