File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed
src/amadeus/namespaces/shopping/hotel Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 1.0.0.beta2 - 2018-03-28
4+
5+ Update singular endpoints to use singular names.
6+
7+ For example:
8+
9+ ``` sh
10+ GET /v1/shopping/hotels/SMPARCOL/hotel-offers
11+ ```
12+
13+ becomes
14+
15+ ``` js
16+ amadeus .shopping .hotel (' SMPARCOL' ).hotelOffers .get ()
17+ ```
18+
319## 1.0.0-beta1 - 2018-03-27
420
521* First Beta release with support for all the initial API endpoints
Original file line number Diff line number Diff line change @@ -131,14 +131,14 @@ describe('Namespaces', () => {
131131 amadeus . client . get = jest . fn ( ) ;
132132 amadeus . shopping . hotel ( 123 ) . hotelOffers . get ( ) ;
133133 expect ( amadeus . client . get )
134- . toHaveBeenCalledWith ( '/v1/shopping/hotel /123/hotel-offers' , { } ) ;
134+ . toHaveBeenCalledWith ( '/v1/shopping/hotels /123/hotel-offers' , { } ) ;
135135 } ) ;
136136
137137 it ( '.amadeus.shopping.hotel(123).offer(234).get' , ( ) => {
138138 amadeus . client . get = jest . fn ( ) ;
139139 amadeus . shopping . hotel ( 123 ) . offer ( 234 ) . get ( ) ;
140140 expect ( amadeus . client . get )
141- . toHaveBeenCalledWith ( '/v1/shopping/hotel /123/offers/234' , { } ) ;
141+ . toHaveBeenCalledWith ( '/v1/shopping/hotels /123/offers/234' , { } ) ;
142142 } ) ;
143143 } ) ;
144144} ) ;
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ class HotelHotelOffers {
2727 * Search for hotel offers for hotel with ID 123
2828 *
2929 * ```js
30- * amadeus.hotel(123 ).hotelOffers.get();
30+ * amadeus.hotel('SMPARCOL' ).hotelOffers.get();
3131 * ```
3232 */
3333 get ( params = { } ) {
34- return this . client . get ( `/v1/shopping/hotel /${ this . hotelId } /hotel-offers` , params ) ;
34+ return this . client . get ( `/v1/shopping/hotels /${ this . hotelId } /hotel-offers` , params ) ;
3535 }
3636}
3737
Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ class Offer {
2929 * Search for hotel offers for hotel with ID 123
3030 *
3131 * ```js
32- * amadeus.hotels(123).offers(234 ).get();
32+ * amadeus.hotel('SMPARCOL').offer('AC7D4DA2C322A73AF0824318A4965DA2805A3FC2' ).get();
3333 * ```
3434 */
3535 get ( params = { } ) {
3636 return this . client . get (
37- `/v1/shopping/hotel /${ this . hotelId } /offers/${ this . offerId } ` , params
37+ `/v1/shopping/hotels /${ this . hotelId } /offers/${ this . offerId } ` , params
3838 ) ;
3939 }
4040}
You can’t perform that action at this time.
0 commit comments