Skip to content

Commit 0cf5447

Browse files
authored
Merge pull request #208 from amadeus4dev/SafePlaceDeco
Safe Place API decommission
2 parents 42545a2 + 9b7dda5 commit 0cf5447

File tree

10 files changed

+0
-152
lines changed

10 files changed

+0
-152
lines changed

README.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,6 @@ List of supported endpoints
295295
# Location Score
296296
amadeus.location.analytics.category_rated_areas.get(latitude=41.397158, longitude=2.160873)
297297
298-
# Safe Place
299-
# How safe is Barcelona? (based a geo location and a radius)
300-
amadeus.safety.safety_rated_locations.get(latitude=41.397158, longitude=2.160873)
301-
# How safe is Barcelona? (based on a square)
302-
amadeus.safety.safety_rated_locations.by_square.get(north=41.397158, west=2.160873,
303-
south=41.394582, east=2.177181)
304-
# What is the safety information of a location based on it's Id?
305-
amadeus.safety.safety_rated_location('Q930400801').get()
306-
307298
# Trip Purpose Prediction
308299
amadeus.travel.predictions.trip_purpose.get(originLocationCode='ATH', destinationLocationCode='MAD', departureDate='2022-11-01', returnDate='2022-11-08')
309300

amadeus/namespaces/_safety.py

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

amadeus/namespaces/core.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from amadeus.namespaces._e_reputation import EReputation
55
from amadeus.namespaces._airport import Airport
66
from amadeus.namespaces._booking import Booking
7-
from amadeus.namespaces._safety import Safety
87
from amadeus.namespaces._schedule import Schedule
98
from amadeus.namespaces._analytics import Analytics
109
from amadeus.namespaces._location import Location
@@ -20,7 +19,6 @@ def __init__(self):
2019
self.e_reputation = EReputation(self)
2120
self.airport = Airport(self)
2221
self.booking = Booking(self)
23-
self.safety = Safety(self)
2422
self.schedule = Schedule(self)
2523
self.analytics = Analytics(self)
2624
self.location = Location(self)

amadeus/safety/__init__.py

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

amadeus/safety/_safety_rated_location.py

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

amadeus/safety/_safety_rated_locations.py

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

amadeus/safety/safety_rated_locations/__init__.py

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

amadeus/safety/safety_rated_locations/_by_square.py

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

docs/index.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,6 @@ Booking
218218
.. autoclass:: amadeus.booking.HotelBookings
219219
:members: post
220220

221-
Safety/SafetyRatedLocations
222-
=======================
223-
224-
.. autoclass:: amadeus.safety.SafetyRatedLocations
225-
:members: get
226-
227-
.. autoclass:: amadeus.safety.safety_rated_locations.BySquare
228-
:members: get
229-
230-
.. autoclass:: amadeus.safety.safety_rated_locations.SafetyRatedLocation
231-
:members: get
232-
233221
Schedule/Flights
234222
================
235223

specs/namespaces/test_namespaces.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ def test_expected_paths(client):
5555
assert client.travel.from_base64 is not None
5656
assert client.booking.flight_orders is not None
5757
assert client.booking.flight_order is not None
58-
assert client.safety.safety_rated_locations is not None
59-
assert client.safety.safety_rated_locations.by_square is not None
60-
assert client.safety.safety_rated_location is not None
6158
assert client.schedule is not None
6259
assert client.schedule.flights is not None
6360
assert client.analytics is not None
@@ -101,8 +98,6 @@ def test_expected_get_methods(client):
10198
assert client.airport.direct_destinations.get is not None
10299
assert client.booking.flight_order('123').get is not None
103100
assert client.booking.flight_order('123').delete is not None
104-
assert client.safety.safety_rated_locations.by_square.get is not None
105-
assert client.safety.safety_rated_location('Q930402719').get is not None
106101
assert client.schedule.flights.get is not None
107102
assert client.analytics.itinerary_price_metrics.get is not None
108103
assert client.location.analytics.category_rated_areas.get is not None
@@ -440,27 +435,6 @@ def test_shopping_booking_hotel_bookings_post_list(client_setup):
440435
)
441436

442437

443-
def test_safety_safety_rated_locations_get(client_setup):
444-
client_setup.safety.safety_rated_locations.get(a='b')
445-
client_setup.get.assert_called_with(
446-
'/v1/safety/safety-rated-locations', a='b'
447-
)
448-
449-
450-
def test_safety_safety_rated_locations_by_square_get(client_setup):
451-
client_setup.safety.safety_rated_locations.by_square.get(a='b')
452-
client_setup.get.assert_called_with(
453-
'/v1/safety/safety-rated-locations/by-square', a='b'
454-
)
455-
456-
457-
def test_safety_safety_rated_location_get(client_setup):
458-
client_setup.safety.safety_rated_location('XXX').get(a='b')
459-
client_setup.get.assert_called_with(
460-
'/v1/safety/safety-rated-locations/XXX', a='b'
461-
)
462-
463-
464438
def test_schedule_flights_get(client_setup):
465439
client_setup.schedule.flights.get(a='b')
466440
client_setup.get.assert_called_with(

0 commit comments

Comments
 (0)