Comparing version 4.0.0 to 5.0.0
# Changelog | ||
## 5.0.0 - 2020-05-21 | ||
Decommission Flight Low-Fare Search API | ||
Decommission Flight Choice Prediction v1 | ||
Adding [Flight Choice Prediction v2](https://developers.amadeus.com/self-service/category/air/api-doc/flight-choice-prediction/api-reference) | ||
> The input of Flight Choice Prediction v2 is the result of Flight Offers Search API - in v1 the input was the result of Flight Low-Fare Search | ||
Adding support for [POI API](https://developers.amadeus.com/self-service/category/destination-content/api-doc/points-of-interest/api-reference)'s retrieve endpoint | ||
## 4.0.0 - 2020-03-25 | ||
@@ -3,0 +13,0 @@ Add support for the [Flight Offers Price API](https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-price) |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _poi = _interopRequireDefault(require("./locations/poi")); | ||
var _pois = _interopRequireDefault(require("./locations/pois")); | ||
@@ -71,2 +73,7 @@ | ||
} | ||
}, { | ||
key: "pointOfInterest", | ||
value: function pointOfInterest(poiId) { | ||
return new _poi["default"](this.client, poiId); | ||
} | ||
}]); | ||
@@ -80,2 +87,2 @@ | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hbWFkZXVzL25hbWVzcGFjZXMvcmVmZXJlbmNlX2RhdGEvbG9jYXRpb25zLmpzIl0sIm5hbWVzIjpbIkxvY2F0aW9ucyIsImNsaWVudCIsImFpcnBvcnRzIiwiQWlycG9ydHMiLCJwb2ludHNPZkludGVyZXN0IiwiUG9pbnRzT2ZJbnRlcmVzdCIsInBhcmFtcyIsImdldCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOztBQUNBOzs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7Ozs7O0lBY01BLFM7OztBQUNKLHFCQUFZQyxNQUFaLEVBQW9CO0FBQUE7O0FBQ2xCLFNBQUtBLE1BQUwsR0FBY0EsT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hcmNoIGZvclxuICAgKiBAcmV0dXJuIHtQcm9taXNlLjxSZXNwb25zZSxSZXNwb25zZUVycm9yPn0gYSBQcm9taXNlXG4gICAqXG4gICAqIEZpbmQgYW55IGxvY2F0aW9uIHN0YXJ0aW5nIHdpdGggJ2xvbidcbiAgICpcbiAgICogYGBganNcbiAgICogYW1hZGV1cy5yZWZlcmVuY2VEYXRhLmxvY2F0aW9uLmdldCh7XG4gICAqICAga2V5d29yZDogJ2xvbicsXG4gICAqICAgc3ViVHlwZTogQW1hZGV1cy5sb2NhdGlvbi5hbnlcbiAgICogfSk7XG4gICAqIGBgYFxuICAgKi9cbiAgZ2V0KHBhcmFtcyA9IHt9KSB7XG4gICAgcmV0dXJuIHRoaXMuY2xpZW50LmdldCgnL3YxL3JlZmVyZW5jZS1kYXRhL2xvY2F0aW9ucycsIHBhcmFtcyk7XG4gIH1cblxuICBwb2ludE9mSW50ZXJlc3QocG9pSWQpIHtcbiAgICByZXR1cm4gbmV3IFBvaW50T2ZJbnRlcmVzdCh0aGlzLmNsaWVudCwgcG9pSWQpO1xuICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgTG9jYXRpb25zO1xuIl19 |
@@ -31,7 +31,7 @@ "use strict"; | ||
*/ | ||
var pointsOfInterest = | ||
var PointsOfInterest = | ||
/*#__PURE__*/ | ||
function () { | ||
function pointsOfInterest(client) { | ||
_classCallCheck(this, pointsOfInterest); | ||
function PointsOfInterest(client) { | ||
_classCallCheck(this, PointsOfInterest); | ||
@@ -42,3 +42,3 @@ this.client = client; | ||
/** | ||
* Returns a list of relevant points of interest near to a given point. | ||
* Returns a list of relevant points of interest near to a given point | ||
* | ||
@@ -64,3 +64,3 @@ * @param {Object} params | ||
_createClass(pointsOfInterest, [{ | ||
_createClass(PointsOfInterest, [{ | ||
key: "get", | ||
@@ -73,8 +73,8 @@ value: function get() { | ||
return pointsOfInterest; | ||
return PointsOfInterest; | ||
}(); | ||
var _default = pointsOfInterest; | ||
var _default = PointsOfInterest; | ||
exports["default"] = _default; | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hbWFkZXVzL25hbWVzcGFjZXMvcmVmZXJlbmNlX2RhdGEvbG9jYXRpb25zL3BvaXMuanMiXSwibmFtZXMiOlsicG9pbnRzT2ZJbnRlcmVzdCIsImNsaWVudCIsImJ5U3F1YXJlIiwiQnlTcXVhcmUiLCJwYXJhbXMiLCJnZXQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7Ozs7Ozs7OztBQUVBOzs7Ozs7Ozs7Ozs7O0lBYU1BLGdCOzs7QUFDSiw0QkFBWUMsTUFBWixFQUFvQjtBQUFBOztBQUNsQixTQUFLQSxNQUFMLEdBQWNBLE1BQWQ7QUFDQSxTQUFLQyxRQUFMLEdBQWdCLElBQUlDLG9CQUFKLENBQWFGLE1BQWIsQ0FBaEI7QUFDRDtBQUVEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7MEJBb0JpQjtBQUFBLFVBQWJHLE1BQWEsdUVBQUosRUFBSTtBQUNmLGFBQU8sS0FBS0gsTUFBTCxDQUFZSSxHQUFaLENBQWdCLG1DQUFoQixFQUFxREQsTUFBckQsQ0FBUDtBQUNEOzs7Ozs7ZUFHWUosZ0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQnlTcXVhcmUgZnJvbSAnLi9wb2ludHNfb2ZfaW50ZXJlc3QvYnktc3F1YXJlJztcblxuLyoqXG4gKiBBIG5hbWVzcGFjZWQgY2xpZW50IGZvciB0aGVcbiAqIGAvdjEvcmVmZXJlbmNlLWRhdGEvbG9jYXRpb25zL3BvaXNgIGVuZHBvaW50c1xuICpcbiAqIEFjY2VzcyB2aWEgdGhlIHtAbGluayBBbWFkZXVzfSBvYmplY3RcbiAqXG4gKiBgYGBqc1xuICogbGV0IGFtYW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0aGUgY2VudGVyIG9mXG4gICAqICAgdGhlIHNlYXJjaCBjaXJjbGUgLSByZXF1aXJlZFxuICAgKiBAcGFyYW0ge0RvdWJsZX0gcGFyYW1zLnJhZGl1cyByYWRpdXMgb2YgdGhlIHNlYXJjaCBpbiBLaWxvbWV0ZXIgLSBvcHRpb25hbFxuICAgKiBAcmV0dXJuIHtQcm9taXNlLjxSZXNwb25zZSxSZXNwb25zZUVycm9yPn0gYSBQcm9taXNlXG4gICAqXG4gICAqIEZpbmQgcmVsZXZhbnQgcG9pbnRzIG9mIGludGVyZXN0IGNsb3NlIHRvIEJhcmNlbG9uYVxuICAgKlxuICAgKiBgYGBqc1xuICAgKiBhbWFkZXVzLnJlZmVyZW5jZURhdGEubG9jYXRpb25zLnBvaW50c09mSW50ZXJlc3QuZ2V0KHtcbiAgICogICBsb25naXR1ZGU6IDIuMTYwODczLFxuICAgKiAgIGxhdGl0dWRlOiA0MS4zOTcxNThcbiAgICogfSk7XG4gICAqIGBgYFxuICAgKi9cbiAgZ2V0KHBhcmFtcyA9IHt9KSB7XG4gICAgcmV0dXJuIHRoaXMuY2xpZW50LmdldCgnL3YxL3JlZmVyZW5jZS1kYXRhL2xvY2F0aW9ucy9wb2lzJywgcGFyYW1zKTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBQb2ludHNPZkludGVyZXN0O1xuIl19 |
@@ -16,6 +16,2 @@ "use strict"; | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
/** | ||
@@ -34,49 +30,13 @@ * A namespaced client for the | ||
*/ | ||
var FlightOffers = | ||
/*#__PURE__*/ | ||
function () { | ||
function FlightOffers(client) { | ||
_classCallCheck(this, FlightOffers); | ||
var FlightOffers = function FlightOffers(client) { | ||
_classCallCheck(this, FlightOffers); | ||
this.client = client; | ||
this.prediction = new _flight_choice_prediction["default"](client); | ||
this.pricing = new _pricing["default"](client); | ||
} | ||
/** | ||
* Find the cheapest bookable flights for a date. | ||
* | ||
* @param {Object} params | ||
* @param {string} params.origin City/Airport IATA code from which the flight | ||
* will depart. BOS, for example. | ||
* @param {string} params.destination City/Airport IATA code to which the | ||
* traveler is going. PAR, for example | ||
* @param {string} params.departureDate The departure date for the flight | ||
* @return {Promise.<Response,ResponseError>} a Promise | ||
* | ||
* Find the cheapest flights from New-York to Madrid for Summer 2020 | ||
* | ||
* ```js | ||
* amadeus.shopping.flightOffers.get({ | ||
* origin: 'NYC', | ||
* destination: 'MAD', | ||
* departureDate: '2020-08-01' | ||
* }); | ||
* ``` | ||
*/ | ||
this.client = client; | ||
this.prediction = new _flight_choice_prediction["default"](client); | ||
this.pricing = new _pricing["default"](client); | ||
}; | ||
_createClass(FlightOffers, [{ | ||
key: "get", | ||
value: function get() { | ||
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return this.client.get('/v1/shopping/flight-offers', params); | ||
} | ||
}]); | ||
return FlightOffers; | ||
}(); | ||
var _default = FlightOffers; | ||
exports["default"] = _default; | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hbWFkZXVzL25hbWVzcGFjZXMvc2hvcHBpbmcvZmxpZ2h0X29mZmVycy5qcyJdLCJuYW1lcyI6WyJGbGlnaHRPZmZlcnMiLCJjbGllbnQiLCJwcmVkaWN0aW9uIiwiRmxpZ2h0Q2hvaWNlUHJlZGljdGlvbiIsInByaWNpbmciLCJQcmljaW5nIiwicGFyYW1zIiwiZ2V0Il0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0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KlxuICogQSBuYW1lc3BhY2VkIGNsaWVudCBmb3IgdGhlXG4gKiBgL3YxL3Nob3BwaW5nL2ZsaWdodC1vZmZlcnNgIGVuZHBvaW50c1xuICpcbiAqIEFjY2VzcyB2aWEgdGhlIHtAbGluayBBbWFkZXVzfSBvYmplY3RcbiAqXG4gKiBgYGBqc1xuICogbGV0IGFtYWRldXMgPSBuZXcgQW1hZGV1cygpO1xuICogYW1hZGV1cy5zaG9wcGluZy5mbGlnaHRPZmZlcnM7XG4gKiBgYGBcbiAqXG4gKiBAcGFyYW0ge0NsaWVudH0gY2xpZW50XG4gKi9cbmNsYXNzIEZsaWdodE9mZmVycyB7XG4gIGNvbnN0cnVjdG9yKGNsaWVudCkge1xuICAgIHRoaXMuY2xpZW50ID0gY2xpZW50O1xuICAgIHRoaXMucHJlZGljdGlvbiA9IG5ldyBGbGlnaHRDaG9pY2VQcmVkaWN0aW9uKGNsaWVudCk7XG4gICAgdGhpcy5wcmljaW5nID0gbmV3IFByaWNpbmcoY2xpZW50KTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBGbGlnaHRPZmZlcnM7XG4iXX0= |
@@ -22,8 +22,3 @@ "use strict"; | ||
* let amadeus = new Amadeus(); | ||
* amadeus.shopping.flightOffers.prediction.post( | ||
* amadeus.shopping.flightOffers.get({ origin: 'NYC', | ||
* destination: 'MAD', | ||
* departureDate: '2020-08-01' | ||
* }).body | ||
* ); | ||
* amadeus.shopping.flightOffers.prediction; | ||
* ``` | ||
@@ -42,17 +37,23 @@ * | ||
/** | ||
* Returns a list of relevant airports near to a given point. | ||
* Returns a list of flight offers with the probability to be chosen. | ||
* | ||
* @param {Object} params | ||
* @param {Double} params.latitude latitude location to be at the center of | ||
* the search circle - required | ||
* @param {Double} params.longitude longitude location to be at the center of | ||
* the search circle - required | ||
* @return {Promise.<Response,ResponseError>} a Promise | ||
* | ||
* Find the nearest airport to the 49.0000,2.55 lat/long | ||
* Returns flights from NYC to MAD with the probability to be chosen. | ||
* | ||
* ```js | ||
* amadeus.referenceData.urls.locations.airports.get({ | ||
* longitude: 49.0000, | ||
* latitude: 2.55 | ||
* amadeus.shopping.flightOffersSearch.get({ | ||
* originLocationCode: 'SYD', | ||
* destinationLocationCode: 'BKK', | ||
* departureDate: '2020-08-01', | ||
* adults: '2' | ||
* }).then(function(response){ | ||
* return amadeus.shopping.flightOffers.prediction.post( | ||
* JSON.stringify(response) | ||
* ); | ||
* }).then(function(response){ | ||
* console.log(response.data); | ||
* }).catch(function(responseError){ | ||
* console.log(responseError); | ||
* }); | ||
@@ -67,3 +68,3 @@ * ``` | ||
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return this.client.post('/v1/shopping/flight-offers/prediction', params); | ||
return this.client.post('/v2/shopping/flight-offers/prediction', params); | ||
} | ||
@@ -78,2 +79,2 @@ }]); | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hbWFkZXVzL25hbWVzcGFjZXMvc2hvcHBpbmcvZmxpZ2h0X29mZmVycy9mbGlnaHRfY2hvaWNlX3ByZWRpY3Rpb24uanMiXSwibmFtZXMiOlsiRmxpZ2h0Q2hvaWNlUHJlZGljdGlvbiIsImNsaWVudCIsInBhcmFtcyIsInBvc3QiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBa0JNQSxzQjs7O0FBQ0osa0NBQVlDLE1BQVosRUFBb0I7QUFBQTs7QUFDbEIsU0FBS0EsTUFBTCxHQUFjQSxNQUFkO0FBQ0Q7QUFFRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7MkJBbUJrQjtBQUFBLFVBQWJDLE1BQWEsdUVBQUosRUFBSTtBQUNoQixhQUFPLEtBQUtELE1BQUwsQ0FBWUUsSUFBWixDQUF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XG4iXX0= |
{ | ||
"name": "amadeus", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Node library for the Amadeus travel APIs", | ||
@@ -5,0 +5,0 @@ "main": "lib/amadeus.js", |
118
README.md
@@ -9,12 +9,7 @@ # Amadeus Node SDK | ||
Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more. | ||
Amadeus provides a rich set of APIs for the travel industry. For more details, check out the [Amadeus for Developers Portal](https://developers.amadeus.com) or the [SDK class reference](https://amadeus4dev.github.io/amadeus-node/). | ||
For more details see the [Node | ||
documentation](https://amadeus4dev.github.io/amadeus-node/) on | ||
[Amadeus.com](https://developers.amadeus.com). | ||
## Installation | ||
This module has been tested using Node 6 and higher, though it should work with | ||
Node 4 and 5 as well. You can install install it using Yarn or NPM. | ||
This module has been tested using Node 6 and higher, though it should work with Node 4 and 5 as well. You can install it using Yarn or NPM. | ||
@@ -27,5 +22,3 @@ ```sh | ||
To make your first API call you will need to [register for an Amadeus Developer | ||
Account](https://developers.amadeus.com/create-account) and [set up your first | ||
application](https://developers.amadeus.com/my-apps). | ||
To make your first API call, you will need to [register](https://developers.amadeus.com/register) for an Amadeus Developer Account and [set up your first application](https://developers.amadeus.com/my-apps). | ||
@@ -64,4 +57,3 @@ ```js | ||
Alternatively it can be initialized without any parameters if the environment | ||
variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present. | ||
Alternatively, it can be initialized without any parameters if the environment variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present. | ||
@@ -72,8 +64,5 @@ ```js | ||
Your credentials can be found on the [Amadeus | ||
dashboard](https://developers.amadeus.com/my-apps). [Sign | ||
up](https://developers.amadeus.com/create-account) for an account today. | ||
Your credentials can be found on the [Amadeus dashboard](https://developers.amadeus.com/my-apps). | ||
By default the environment for the SDK is the `test` environment. To switch to | ||
a production (paid-for) environment please switch the hostname as follows: | ||
By default, the SDK environment is set to `test` environment. To switch to a `production` (pay-as-you-go) environment, please switch the hostname as follows: | ||
@@ -88,20 +77,14 @@ ```js | ||
Amadeus has a large set of APIs, and our documentation is here to get you | ||
started today. Head over to our | ||
[Reference](https://amadeus4dev.github.io/amadeus-node/) documentation for | ||
in-depth information about every SDK method, it's arguments and return types. | ||
Amadeus has a large set of APIs, and our documentation is here to get you started today. Head over to our [reference documentation](https://amadeus4dev.github.io/amadeus-node/) for in-depth information about every SDK method, its arguments and return types. | ||
* [Get Started](https://amadeus4dev.github.io/amadeus-node/) documentation | ||
* [Initialize the SDK](https://amadeus4dev.github.io/amadeus-node/) | ||
* [Get Started](https://amadeus4dev.github.io/amadeus-node/) | ||
* [Find an Airport](https://amadeus4dev.github.io/amadeus-node/#airports) | ||
* [Find a Flight](https://amadeus4dev.github.io/amadeus-node/#flightoffers) | ||
* [Get Flight Inspiration](https://amadeus4dev.github.io/amadeus-node/#flightoffers) | ||
* [Find a Flight](https://amadeus4dev.github.io/amadeus-node/#flightofferssearch) | ||
* [Get Flight Inspiration](https://amadeus4dev.github.io/amadeus-node/#flightdestinations) | ||
## Making API calls | ||
This library conveniently maps every API path to a similar path. | ||
This library conveniently maps every API path to a similar path. For example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be: | ||
For example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be: | ||
```js | ||
@@ -111,6 +94,4 @@ amadeus.referenceData.urls.checkinLinks.get({ airlineCode: 'BA' }); | ||
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. | ||
Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET /v1/shopping/hotelOffers/123/` would be: | ||
For example, `GET /v1/shopping/hotelOffer/123/` would be: | ||
```js | ||
@@ -120,3 +101,3 @@ amadeus.shopping.hotelOffer('123').get(...); | ||
You can make any arbitrary API call as well directly with the `.client.get` method: | ||
You can make any arbitrary `GET` API call directly with the `.client.get` method as well: | ||
@@ -127,3 +108,3 @@ ```js | ||
Or with a `POST` using `.client.post` method: | ||
Or, with a `POST` using `.client.post` method: | ||
```js | ||
@@ -135,11 +116,8 @@ amadeus.client.post('/v1/shopping/flight-offers/pricing', JSON.stringify({ data })); | ||
Every API call returns a `Promise` that either resolves or rejects. Every | ||
resolved API call returns a `Response` object containing a `body` attribute | ||
with the raw response. If the API call contained a JSON response it will parse | ||
the JSON into the `.result` attribute. If this data also contains a `data` key, | ||
it will make that available as the `.data` attribute. | ||
Every API call returns a `Promise` that either resolves or rejects. | ||
For a failed API call it returns a `ResponseError` | ||
containing the (parsed or unparsed) response, the request, and an error code. | ||
Every resolved API call returns a `Response` object containing a `body` attribute with the raw response. If the API call contained a JSON response, it will parse the JSON into the `result` attribute. If this data contains a `data` key, that will be made available in `data` attribute. | ||
For a failed API call, it returns a `ResponseError`object containing the (parsed or unparsed) response, the request, and an error code. | ||
```js | ||
@@ -161,4 +139,3 @@ amadeus.referenceData.urls.checkinLinks.get({ | ||
If an API endpoint supports pagination, the other pages are available under the | ||
`.next`, `.previous`, `.last` and `.first` methods. | ||
If an API endpoint supports pagination, the other pages are available under the `.next`, `.previous`, `.last` and `.first` methods. | ||
@@ -181,3 +158,3 @@ ```js | ||
The SDK makes it easy to add your own logger compatible with the default `console`. | ||
The SDK makes it easy to add your own logger that is compatible with the default `console`. | ||
@@ -192,6 +169,3 @@ ```js | ||
Additionally, to enable more verbose logging, you can set the appropriate level | ||
on your own logger, though the easiest way would be to enable debugging via a | ||
parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment | ||
variable. The available options are `silent` (default), `warn`, and `debug`. | ||
Additionally, to enable more verbose logging, you can set the appropriate level on your own logger. The easiest way would be to enable debugging via a parameter during initialization, or using the `AMADEUS_LOG_LEVEL` environment variable. The available options are `silent` (default), `warn`, and `debug`. | ||
@@ -229,9 +203,10 @@ ```js | ||
// Flight Choice Prediction | ||
amadeus.shopping.flightOffers.get({ | ||
origin: 'MAD', | ||
destination: 'NYC', | ||
departureDate: '2020-08-01' | ||
amadeus.shopping.flightOffersSearch.get({ | ||
originLocationCode: 'SYD', | ||
destinationLocationCode: 'BKK', | ||
departureDate: '2020-08-01', | ||
adults: '2' | ||
}).then(function(response){ | ||
return amadeus.shopping.flightOffers.prediction.post( | ||
JSON.stringify(response.result) | ||
JSON.stringify(response) | ||
); | ||
@@ -246,3 +221,3 @@ }).then(function(response){ | ||
// Flight Create Orders | ||
// To book the flight-offer(s) suggested by flightOffersSearch API | ||
// To book the flight-offer(s) suggested by flightOffersSearch API | ||
// and create a flight-order with travelers' information | ||
@@ -269,6 +244,7 @@ amadeus.shopping.flightOffersSearch.get({ | ||
// Flight Offers Price | ||
amadeus.shopping.flightOffers.get({ | ||
origin: 'MAD', | ||
destination: 'NYC', | ||
departureDate: '2020-08-01' | ||
amadeus.shopping.flightOffersSearch.get({ | ||
originLocationCode: 'SYD', | ||
destinationLocationCode: 'BKK', | ||
departureDate: '2020-08-01', | ||
adults: '1' | ||
}).then(function(response){ | ||
@@ -279,3 +255,3 @@ return amadeus.shopping.flightOffers.pricing.post( | ||
'type': 'flight-offers-pricing', | ||
'flightOffers': response.data | ||
'flightOffers': [response.data[0]] | ||
} | ||
@@ -291,12 +267,13 @@ }) | ||
// Flight SeatMap Display | ||
// To retrieve the seat map of each flight included | ||
// To retrieve the seat map of each flight included | ||
// in flight offers for MAD-NYC flight on 2020-08-01 | ||
amadeus.shopping.flightOffers.get({ | ||
origin: 'MAD', | ||
destination: 'NYC', | ||
departureDate: '2020-08-01' | ||
amadeus.shopping.flightOffersSearch.get({ | ||
originLocationCode: 'SYD', | ||
destinationLocationCode: 'BKK', | ||
departureDate: '2020-08-01', | ||
adults: '1' | ||
}).then(function(response){ | ||
return amadeus.shopping.seatmaps.post( | ||
JSON.stringify({ | ||
'data': response.data | ||
'data': [response.data[0]] | ||
}) | ||
@@ -384,7 +361,7 @@ ); | ||
// Retrieve flight order with ID 'XXX'. This ID comes from the | ||
// Retrieve flight order with ID 'XXX'. This ID comes from the | ||
// Flight Create Orders API, which is a temporary ID in test environment. | ||
amadeus.booking.flightOrder('XXX').get() | ||
// Cancel flight order with ID 'XXX'. This ID comes from the | ||
// Cancel flight order with ID 'XXX'. This ID comes from the | ||
// Flight Create Orders API, which is a temporary ID in test environment. | ||
@@ -418,2 +395,6 @@ amadeus.booking.flightOrder('XXX').delete() | ||
// Points of Interest | ||
// Extract the information about point of interest with ID '9CB40CB5D0' | ||
amadeus.referenceData.locations.pointOfInterest('9CB40CB5D0').get() | ||
// Hotel Ratings | ||
@@ -441,3 +422,3 @@ // Get Sentiment Analysis of reviews about Holiday Inn Paris Notre Dame. | ||
// Flight Delay Prediction | ||
// This machine learning API is based on a prediction model that takes the input of the user - time, carrier, airport and aircraft information; | ||
// This machine learning API is based on a prediction model that takes the input of the user - time, carrier, airport and aircraft information; | ||
// and predict the segment where the flight is likely to lay. | ||
@@ -467,4 +448,3 @@ amadeus.travel.predictions.flightDelay.get({ | ||
Want to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for | ||
guidance on installing and running this code in a development environment. | ||
Want to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for guidance on installing and running this code in a development environment. | ||
@@ -471,0 +451,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
347970
58
3951
444