Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe Place API decommission #208

Merged
merged 5 commits into from
Apr 15, 2024
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 @@ -295,15 +295,6 @@ List of supported endpoints
# Location Score
amadeus.location.analytics.category_rated_areas.get(latitude=41.397158, longitude=2.160873)

# Safe Place
# How safe is Barcelona? (based a geo location and a radius)
amadeus.safety.safety_rated_locations.get(latitude=41.397158, longitude=2.160873)
# How safe is Barcelona? (based on a square)
amadeus.safety.safety_rated_locations.by_square.get(north=41.397158, west=2.160873,
south=41.394582, east=2.177181)
# What is the safety information of a location based on it's Id?
amadeus.safety.safety_rated_location('Q930400801').get()

# Trip Purpose Prediction
amadeus.travel.predictions.trip_purpose.get(originLocationCode='ATH', destinationLocationCode='MAD', departureDate='2022-11-01', returnDate='2022-11-08')

Expand Down
12 changes: 0 additions & 12 deletions amadeus/namespaces/_safety.py

This file was deleted.

2 changes: 0 additions & 2 deletions amadeus/namespaces/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from amadeus.namespaces._e_reputation import EReputation
from amadeus.namespaces._airport import Airport
from amadeus.namespaces._booking import Booking
from amadeus.namespaces._safety import Safety
from amadeus.namespaces._schedule import Schedule
from amadeus.namespaces._analytics import Analytics
from amadeus.namespaces._location import Location
Expand All @@ -20,7 +19,6 @@ def __init__(self):
self.e_reputation = EReputation(self)
self.airport = Airport(self)
self.booking = Booking(self)
self.safety = Safety(self)
self.schedule = Schedule(self)
self.analytics = Analytics(self)
self.location = Location(self)
Expand Down
4 changes: 0 additions & 4 deletions amadeus/safety/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions amadeus/safety/_safety_rated_location.py

This file was deleted.

32 changes: 0 additions & 32 deletions amadeus/safety/_safety_rated_locations.py

This file was deleted.

2 changes: 0 additions & 2 deletions amadeus/safety/safety_rated_locations/__init__.py

This file was deleted.

32 changes: 0 additions & 32 deletions amadeus/safety/safety_rated_locations/_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 @@ -218,18 +218,6 @@ Booking
.. autoclass:: amadeus.booking.HotelBookings
:members: post

Safety/SafetyRatedLocations
=======================

.. autoclass:: amadeus.safety.SafetyRatedLocations
:members: get

.. autoclass:: amadeus.safety.safety_rated_locations.BySquare
:members: get

.. autoclass:: amadeus.safety.safety_rated_locations.SafetyRatedLocation
:members: get

Schedule/Flights
================

Expand Down
26 changes: 0 additions & 26 deletions specs/namespaces/test_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def test_expected_paths(client):
assert client.travel.from_base64 is not None
assert client.booking.flight_orders is not None
assert client.booking.flight_order is not None
assert client.safety.safety_rated_locations is not None
assert client.safety.safety_rated_locations.by_square is not None
assert client.safety.safety_rated_location is not None
assert client.schedule is not None
assert client.schedule.flights is not None
assert client.analytics is not None
Expand Down Expand Up @@ -101,8 +98,6 @@ def test_expected_get_methods(client):
assert client.airport.direct_destinations.get is not None
assert client.booking.flight_order('123').get is not None
assert client.booking.flight_order('123').delete is not None
assert client.safety.safety_rated_locations.by_square.get is not None
assert client.safety.safety_rated_location('Q930402719').get 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
Expand Down Expand Up @@ -440,27 +435,6 @@ def test_shopping_booking_hotel_bookings_post_list(client_setup):
)


def test_safety_safety_rated_locations_get(client_setup):
client_setup.safety.safety_rated_locations.get(a='b')
client_setup.get.assert_called_with(
'/v1/safety/safety-rated-locations', a='b'
)


def test_safety_safety_rated_locations_by_square_get(client_setup):
client_setup.safety.safety_rated_locations.by_square.get(a='b')
client_setup.get.assert_called_with(
'/v1/safety/safety-rated-locations/by-square', a='b'
)


def test_safety_safety_rated_location_get(client_setup):
client_setup.safety.safety_rated_location('XXX').get(a='b')
client_setup.get.assert_called_with(
'/v1/safety/safety-rated-locations/XXX', a='b'
)


def test_schedule_flights_get(client_setup):
client_setup.schedule.flights.get(a='b')
client_setup.get.assert_called_with(
Expand Down
Loading