Skip to content

Commit c1f700c

Browse files
authored
Merge pull request #182 from amadeus4dev/hotelv2-remove
Remove Hotel Search API v2
2 parents c750c21 + eaef462 commit c1f700c

File tree

8 files changed

+5
-130
lines changed

8 files changed

+5
-130
lines changed

README.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,6 @@ List of supported endpoints
257257
258258
# Flight Busiest Travel Period
259259
amadeus.travel.analytics.air_traffic.busiest_period.get(cityCode='MAD', period='2017', direction='ARRIVING')
260-
261-
# Hotel Search
262-
# Get list of Hotels by city code
263-
amadeus.shopping.hotel_offers.get(cityCode='LON')
264-
# Get list of offers for a specific hotel
265-
amadeus.shopping.hotel_offers_by_hotel.get(hotelId='BGLONBGB')
266-
# Confirm the availability of a specific offer
267-
offerId = amadeus.shopping.hotel_offer('8123DD9DE5102DADF5DA3B55C8C575F54114336EE718578753888747FE0652FC').get()
268260
269261
# Hotel Search v3
270262
# Get list of available offers by hotel ids

amadeus/namespaces/_shopping.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
from amadeus.shopping._flight_destinations import FlightDestinations
44
from amadeus.shopping._flight_offers import FlightOffers
55
from amadeus.shopping._flight_offers_search import FlightOffersSearch
6-
from amadeus.shopping._hotel_offers import HotelOffers
7-
from amadeus.shopping._hotel_offers_by_hotel import HotelOffersByHotel
8-
from amadeus.shopping._hotel_offer import HotelOffer
96
from amadeus.shopping._seatmaps import Seatmaps
107
from amadeus.shopping._activities import Activities
118
from amadeus.shopping._activity import Activity
@@ -20,17 +17,12 @@ def __init__(self, client):
2017
self.flight_dates = FlightDates(client)
2118
self.flight_destinations = FlightDestinations(client)
2219
self.flight_offers = FlightOffers(client)
23-
self.hotel_offers = HotelOffers(client)
24-
self.hotel_offers_by_hotel = HotelOffersByHotel(client)
2520
self.flight_offers_search = FlightOffersSearch(client)
2621
self.seatmaps = Seatmaps(client)
2722
self.activities = Activities(client)
2823
self.availability = Availability(client)
2924
self.hotel_offers_search = HotelOffersSearch(client)
3025

31-
def hotel_offer(self, offer_id):
32-
return HotelOffer(self.client, offer_id)
33-
3426
def hotel_offer_search(self, offer_id):
3527
return HotelOfferSearch(self.client, offer_id)
3628

amadeus/shopping/__init__.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
from ._flight_offers import FlightOffers
21
from ._flight_dates import FlightDates
32
from ._flight_destinations import FlightDestinations
43
from ._flight_offers_search import FlightOffersSearch
5-
from ._hotel_offers import HotelOffers
6-
from ._hotel_offers_by_hotel import HotelOffersByHotel
7-
from ._hotel_offer import HotelOffer
4+
from ._hotel_offer_search import HotelOfferSearch
5+
from ._hotel_offers_search import HotelOffersSearch
86
from ._activities import Activities
97

10-
__all__ = ['FlightOffers', 'FlightDates',
11-
'FlightDestinations', 'FlightOffersSearch',
12-
'HotelOffers', 'HotelOffersByHotel',
13-
'HotelOffer', 'Activities']
8+
__all__ = ['FlightDates', 'FlightDestinations',
9+
'HotelOffersSearch', 'HotelOfferSearch',
10+
'FlightOffersSearch', 'Activities']

amadeus/shopping/_hotel_offer.py

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

amadeus/shopping/_hotel_offers.py

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

amadeus/shopping/_hotel_offers_by_hotel.py

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

docs/index.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ Shopping/Flights
5353
Shopping/Hotels
5454
===============
5555

56-
.. autoclass:: amadeus.shopping.HotelOffers
57-
:members: get
58-
59-
.. autoclass:: amadeus.shopping.hotel.HotelOffers
60-
:members: get
61-
62-
.. autoclass:: amadeus.shopping.hotel.Offer
63-
:members: get
64-
6556
.. autoclass:: amadeus.shopping.hotel.HotelOffersSearch
6657
:members: get
6758

specs/namespaces/test_namespaces.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ def test_expected_paths(client):
4040
assert client.shopping.flight_offers.pricing is not None
4141
assert client.shopping.flight_offers.upselling is not None
4242
assert client.shopping.seatmaps is not None
43-
assert client.shopping.hotel_offers is not None
44-
assert client.shopping.hotel_offer is not None
45-
assert client.shopping.hotel_offers_by_hotel is not None
4643
assert client.shopping.hotel_offers_search is not None
4744
assert client.shopping.hotel_offer_search is not None
4845
assert client.shopping.activities is not None
@@ -97,9 +94,6 @@ def test_expected_get_methods(client):
9794
assert client.shopping.flight_destinations.get is not None
9895
assert client.shopping.flight_offers_search.get is not None
9996
assert client.shopping.seatmaps.get is not None
100-
assert client.shopping.hotel_offers.get is not None
101-
assert client.shopping.hotel_offers_by_hotel.get is not None
102-
assert client.shopping.hotel_offer('123').get is not None
10397
assert client.shopping.hotel_offers_search.get is not None
10498
assert client.shopping.hotel_offer_search('123').get is not None
10599
assert client.e_reputation.hotel_sentiments.get is not None
@@ -259,27 +253,6 @@ def test_shopping_flight_offers_search_get(client_setup):
259253
)
260254

261255

262-
def test_shopping_hotel_offers_get(client_setup):
263-
client_setup.shopping.hotel_offers.get(cityCode='MAD')
264-
client_setup.get.assert_called_with(
265-
'/v2/shopping/hotel-offers', cityCode='MAD'
266-
)
267-
268-
269-
def test_shopping_hotel_offers_by_hotel_get(client_setup):
270-
client_setup.shopping.hotel_offers_by_hotel.get(hotelId='XKPARC12')
271-
client_setup.get.assert_called_with(
272-
'/v2/shopping/hotel-offers/by-hotel', hotelId='XKPARC12'
273-
)
274-
275-
276-
def test_shopping_hotel_offer_get(client_setup):
277-
client_setup.shopping.hotel_offer('XXX').get(a='b')
278-
client_setup.get.assert_called_with(
279-
'/v2/shopping/hotel-offers/XXX', a='b'
280-
)
281-
282-
283256
def test_shopping_hotel_offers_search_get(client_setup):
284257
client_setup.shopping.hotel_offers_search.get(
285258
hotelIds='RTPAR001', adults=2)

0 commit comments

Comments
 (0)