Skip to content

Commit f9c9056

Browse files
authored
Merge pull request #244 from amadeus4dev/remove-hotelv2
Remove Hotel Search v2
2 parents 3c1905c + 3411806 commit f9c9056

File tree

12 files changed

+11
-623
lines changed

12 files changed

+11
-623
lines changed

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ This library conveniently maps every API path to a similar path. For example, `G
9494
amadeus.referenceData.urls.checkinLinks.get(Params.with("airlineCode", "BA"));
9595
```
9696

97-
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET /v2/shopping/hotel-offers/XXX` would be:
97+
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET v1/reference-data/locations/pois` would be:
9898

9999
```java
100-
amadeus.shopping.hotelOffer("XXX").get(...);
100+
amadeus.referenceData.locations.pointOfInterest("9CB40CB5D0").get();
101101
```
102102

103103
You can make any arbitrary API call as well directly with the `.get` method.
@@ -268,22 +268,6 @@ Period[] busiestPeriods = amadeus.travel.analytics.airTraffic.busiestPeriod.get(
268268
.and("period", "2017")
269269
.and("direction", BusiestPeriod.ARRIVING));
270270

271-
// Hotel Search API
272-
// Get list of hotels by city code
273-
HotelOffer[] offers = amadeus.shopping.hotelOffers.get(Params
274-
.with("cityCode", "MAD"));
275-
// Get list of offers for a specific hotel
276-
HotelOffer hotelOffer = amadeus.shopping.hotelOffersByHotel.get(Params.with("hotelId", "BGLONBGB"));
277-
// Confirm the availability of a specific offer
278-
HotelOffer offer = amadeus.shopping.hotelOffer("4BA070CE929E135B3268A9F2D0C51E9D4A6CF318BA10485322FA2C7E78C7852E").get();
279-
280-
// Hotel Booking
281-
// The body can be a String version of your JSON or a JsonObject
282-
HotelBooking[] hotel = amadeus.booking.hotelBookings.post(body);
283-
284-
// Hotel Ratings / Sentiments
285-
HotelSentiment[] hotelSentiments = amadeus.ereputation.hotelSentiments.get(Params.with("hotelIds", "ELONMFS,ADNYCCTB"));
286-
287271
// Points of Interest
288272
// What are the popular places in Barcelona (based a geo location and a radius)
289273
PointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.get(Params
@@ -444,13 +428,20 @@ Hotel[] result = amadeus.referenceData.locations.hotel.get(Params
444428
HotelOfferSearch[] offers = amadeus.shopping.hotelOffersSearch.get(Params
445429
.with("hotelIds", "MCLONGHM")
446430
.and("adults", 1)
447-
.and("checkInDate", "2022-11-22")
431+
.and("checkInDate", "2023-05-22")
448432
.and("roomQuantity", 1)
449433
.and("paymentPolicy", "NONE")
450434
.and("bestRateOnly", true));
451435
// Get hotel offer pricing by offer id
452436
HotelOfferSearch offer = amadeus.shopping.hotelOfferSearch("QF3MNOBDQ8").get();
453437

438+
// Hotel Booking
439+
// The body can be a String version of your JSON or a JsonObject
440+
HotelBooking[] hotel = amadeus.booking.hotelBookings.post(body);
441+
442+
// Hotel Ratings / Sentiments
443+
HotelSentiment[] hotelSentiments = amadeus.ereputation.hotelSentiments.get(Params.with("hotelIds", "ELONMFS,ADNYCCTB"));
444+
454445
// Airline Routes
455446
// Get airline destinations
456447
Destination[] destinations = amadeus.airline.destinations.get(Params

src/main/java/com/amadeus/Shopping.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
import com.amadeus.shopping.FlightDestinations;
88
import com.amadeus.shopping.FlightOffers;
99
import com.amadeus.shopping.FlightOffersSearch;
10-
import com.amadeus.shopping.HotelOffer;
1110
import com.amadeus.shopping.HotelOfferSearch;
12-
import com.amadeus.shopping.HotelOffers;
13-
import com.amadeus.shopping.HotelOffersByHotel;
1411
import com.amadeus.shopping.HotelOffersSearch;
1512
import com.amadeus.shopping.SeatMaps;
1613

@@ -66,14 +63,6 @@ public class Shopping {
6663
*/
6764
public FlightOffersSearch flightOffersSearch;
6865

69-
/**
70-
* <p>
71-
* A namespaced client for the
72-
* <code>/v2/shopping/hotel-offers</code> endpoints.
73-
* </p>
74-
*/
75-
public HotelOffers hotelOffers;
76-
7766
/**
7867
* <p>
7968
* A namespaced client for the
@@ -82,14 +71,6 @@ public class Shopping {
8271
*/
8372
public HotelOffersSearch hotelOffersSearch;
8473

85-
/**
86-
* <p>
87-
* A namespaced client for the
88-
* <code>/v2/shopping/hotel-offers/by-hotel</code> endpoints.
89-
* </p>
90-
*/
91-
public HotelOffersByHotel hotelOffersByHotel;
92-
9374
/**
9475
* <p>
9576
* A namespaced client for the
@@ -131,25 +112,13 @@ public Shopping(Amadeus client) {
131112
this.flightDates = new FlightDates(client);
132113
this.flightDestinations = new FlightDestinations(client);
133114
this.flightOffers = new FlightOffers(client);
134-
this.hotelOffers = new HotelOffers(client);
135115
this.hotelOffersSearch = new HotelOffersSearch(client);
136-
this.hotelOffersByHotel = new HotelOffersByHotel(client);
137116
this.flightOffersSearch = new FlightOffersSearch(client);
138117
this.seatMaps = new SeatMaps(client);
139118
this.activities = new Activities(client);
140119
this.availability = new Availability(client);
141120
}
142121

143-
/**
144-
* <p>
145-
* A namespaced client for the
146-
* <code>/v1/shopping/hotel/:hotel_id</code> endpoints.
147-
* </p>
148-
*/
149-
public HotelOffer hotelOffer(String hotelId) {
150-
return new HotelOffer(client, hotelId);
151-
}
152-
153122
/**
154123
* <p>
155124
* A namespaced client for the

0 commit comments

Comments
 (0)