Skip to content

Commit 5b9a27e

Browse files
committed
january 2023 2 APIs decommissions
1 parent af82911 commit 5b9a27e

File tree

8 files changed

+8
-255
lines changed

8 files changed

+8
-255
lines changed

README.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,13 @@ amadeus.referenceData.locations.cities.get({
368368
keyword: 'Paris'
369369
})
370370

371+
//Hotel Name Autocomplete API
372+
//Autocomplete a hotel search field
373+
amadeus.referenceData.locations.hotel.get({
374+
keyword: 'PARI',
375+
subType: 'HOTEL_GDS'
376+
})
377+
371378
//Hotel List API
372379
//Get list of hotels by city code
373380
amadeus.referenceData.locations.hotels.byCity.get({
@@ -385,25 +392,6 @@ amadeus.referenceData.locations.hotels.byHotels.get({
385392
hotelIds: 'ACPAR245'
386393
})
387394

388-
//Hotel Name Autocomplete API
389-
//Autocomplete a hotel search field
390-
amadeus.referenceData.locations.hotel.get({
391-
keyword: 'PARI',
392-
subType: 'HOTEL_GDS'
393-
})
394-
395-
// Hotel Search API V2
396-
// Get list of hotels by city code
397-
amadeus.shopping.hotelOffers.get({
398-
cityCode : 'MAD'
399-
})
400-
// Get list of offers for a specific hotel
401-
amadeus.shopping.hotelOffersByHotel.get({
402-
hotelId : 'XKPARC12'
403-
})
404-
// Confirm the availability of a specific offer id
405-
amadeus.shopping.hotelOffer('XXX').get()
406-
407395
// Hotel Search API V3
408396
// Get list of available offers in specific hotels by hotel ids
409397
amadeus.shopping.hotelOffersSearch.get({
@@ -554,12 +542,6 @@ amadeus.dutyOfCare.diseases.covid19Report.get({
554542
language: 'EN'
555543
});
556544

557-
// Travel Restrictions API v1
558-
amadeus.dutyOfCare.diseases.covid19AreaReport.get({
559-
countryCode: 'US',
560-
cityCode: 'NYC'
561-
});
562-
563545
```
564546
565547
## Development & Contributing

spec/amadeus/namespaces.test.js

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ describe('Namespaces', () => {
6666
expect(amadeus.booking).toBeDefined();
6767
expect(amadeus.booking.flightOrders).toBeDefined();
6868

69-
expect(amadeus.shopping.hotelOffers).toBeDefined();
70-
expect(amadeus.shopping.hotelOffersByHotel).toBeDefined();
71-
expect(amadeus.shopping.hotelOffer).toBeDefined();
72-
7369
expect(amadeus.shopping.hotelOfferSearch).toBeDefined();
7470
expect(amadeus.shopping.hotelOffersSearch).toBeDefined();
7571

@@ -101,7 +97,6 @@ describe('Namespaces', () => {
10197

10298
expect(amadeus.dutyOfCare).toBeDefined();
10399
expect(amadeus.dutyOfCare.diseases).toBeDefined();
104-
expect(amadeus.dutyOfCare.diseases.covid19AreaReport).toBeDefined();
105100
expect(amadeus.dutyOfCare.diseases.covid19Report).toBeDefined();
106101

107102
expect(amadeus.airline.destinations).toBeDefined();
@@ -134,10 +129,6 @@ describe('Namespaces', () => {
134129
expect(amadeus.shopping.flightOffersSearch.get).toBeDefined();
135130
expect(amadeus.shopping.seatmaps.get).toBeDefined();
136131

137-
expect(amadeus.shopping.hotelOffers.get).toBeDefined();
138-
expect(amadeus.shopping.hotelOffersByHotel.get).toBeDefined();
139-
expect(amadeus.shopping.hotelOffer('XXX').get).toBeDefined();
140-
141132
expect(amadeus.shopping.hotelOfferSearch('XXX').get).toBeDefined();
142133
expect(amadeus.shopping.hotelOffersSearch.get).toBeDefined();
143134

@@ -161,7 +152,6 @@ describe('Namespaces', () => {
161152

162153
expect(amadeus.location.analytics.categoryRatedAreas.get).toBeDefined();
163154

164-
expect(amadeus.dutyOfCare.diseases.covid19AreaReport.get).toBeDefined();
165155
expect(amadeus.dutyOfCare.diseases.covid19Report.get).toBeDefined();
166156

167157
expect(amadeus.airline.destinations.get).toBeDefined();
@@ -391,27 +381,6 @@ describe('Namespaces', () => {
391381
.toHaveBeenCalledWith('/v1/shopping/seatmaps', {});
392382
});
393383

394-
it('.amadeus.shopping.hotelOffers.get', () => {
395-
amadeus.client.get = jest.fn();
396-
amadeus.shopping.hotelOffers.get();
397-
expect(amadeus.client.get)
398-
.toHaveBeenCalledWith('/v2/shopping/hotel-offers', {});
399-
});
400-
401-
it('.amadeus.shopping.hotelOffersByHotel.get', () => {
402-
amadeus.client.get = jest.fn();
403-
amadeus.shopping.hotelOffersByHotel.get();
404-
expect(amadeus.client.get)
405-
.toHaveBeenCalledWith('/v2/shopping/hotel-offers/by-hotel', {});
406-
});
407-
408-
it('.amadeus.shopping.hotelOffer().get', () => {
409-
amadeus.client.get = jest.fn();
410-
amadeus.shopping.hotelOffer('XXX').get();
411-
expect(amadeus.client.get)
412-
.toHaveBeenCalledWith('/v2/shopping/hotel-offers/XXX', {});
413-
});
414-
415384
it('.amadeus.shopping.hotelOfferSearch().get', () => {
416385
amadeus.client.get = jest.fn();
417386
amadeus.shopping.hotelOfferSearch('XXX').get();
@@ -538,13 +507,6 @@ describe('Namespaces', () => {
538507
.toHaveBeenCalledWith('/v1/shopping/flight-offers/upselling', {});
539508
});
540509

541-
it('.amadeus.dutyOfCare.diseases.covid19AreaReport.get', () => {
542-
amadeus.client.get = jest.fn();
543-
amadeus.dutyOfCare.diseases.covid19AreaReport.get();
544-
expect(amadeus.client.get)
545-
.toHaveBeenCalledWith('/v1/duty-of-care/diseases/covid19-area-report', {});
546-
});
547-
548510
it('.amadeus.dutyOfCare.diseases.covid19Report.get', () => {
549511
amadeus.client.get = jest.fn();
550512
amadeus.dutyOfCare.diseases.covid19Report.get();

src/amadeus/namespaces/duty_of_care/diseases.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import Covid19AreaReport from './diseases/covid19_area_report';
21
import Covid19Report from './diseases/covid19_report';
32
/**
43
* A namespaced client for the
5-
* `/v1/duty-of-care/diseases` and `/v2/duty-of-care/diseases` endpoints
4+
* `/v2/duty-of-care/diseases` endpoints
65
*
76
* Access via the {@link Amadeus} object
87
*
@@ -16,7 +15,6 @@ import Covid19Report from './diseases/covid19_report';
1615
class Diseases {
1716
constructor(client) {
1817
this.client = client;
19-
this.covid19AreaReport = new Covid19AreaReport(client);
2018
this.covid19Report = new Covid19Report(client);
2119
}
2220
}

src/amadeus/namespaces/duty_of_care/diseases/covid19_area_report.js

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

src/amadeus/namespaces/shopping.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import FlightOffers from './shopping/flight_offers';
33
import FlightOffersSearch from './shopping/flight_offers_search';
44
import FlightDates from './shopping/flight_dates';
55
import Seatmaps from './shopping/seatmaps';
6-
import HotelOffers from './shopping/hotel_offers';
7-
import HotelOffersByHotel from './shopping/hotel_offers_by_hotel';
8-
import HotelOffer from './shopping/hotel_offer';
96
import HotelOfferSearch from './shopping/hotel_offer_search';
107
import HotelOffersSearch from './shopping/hotel_offers_search';
118
import Activities from './shopping/activities';
@@ -30,9 +27,6 @@ import Availability from './shopping/availability';
3027
* @property {FlightOffersSearch} flightOffersSearch
3128
* @property {FlightDates} flightDates
3229
* @property {Seatmaps} seatmaps
33-
* @property {HotelOffers} hotelOffers
34-
* @property {HotelOffer} hotelOffer
35-
* @property {HotelOffersByHotel} hotelOffersByHotel
3630
* @property {HotelOfferSearch} hotelOffers
3731
* @property {HotelOffersSearch} hotelOffers
3832
* @property {Availability} availability
@@ -45,24 +39,11 @@ class Shopping {
4539
this.flightOffersSearch = new FlightOffersSearch(client);
4640
this.flightDates = new FlightDates(client);
4741
this.seatmaps = new Seatmaps(client);
48-
this.hotelOffers = new HotelOffers(client);
49-
this.hotelOffersByHotel = new HotelOffersByHotel(client);
5042
this.hotelOffersSearch = new HotelOffersSearch(client);
5143
this.activities = new Activities(client);
5244
this.availability = new Availability(client);
5345
}
5446

55-
56-
/**
57-
* Loads a namespaced path for a specific offer ID for Hotel Search V2
58-
*
59-
* @param {string} [offerId] The ID of the offer for a dedicated hotel
60-
* @return {HotelOffer}
61-
**/
62-
hotelOffer(offerId) {
63-
return new HotelOffer(this.client, offerId);
64-
}
65-
6647
/**
6748
* Loads a namespaced path for a specific offer ID for Hotel Search V3
6849
*

src/amadeus/namespaces/shopping/hotel_offer.js

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

src/amadeus/namespaces/shopping/hotel_offers.js

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

src/amadeus/namespaces/shopping/hotel_offers_by_hotel.js

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

0 commit comments

Comments
 (0)