1.0.7 • Published 8 years ago
momondo v1.0.7
Momondo
Node.js implementation to make it easy for sending request to Momondo Flights Search API and receiving easy response
Install with:
npm install momondo
Usage
Search flights example:
var momondo = require('momondo');
momondo['10'].search(
{
"class":"E",
"travelers":{
"adult": 1,
"child": 0,
"infant": 0
},
"lang": "ru",
"routes":[
{
"from": "MOW",
"to": "LON",
"date": "2016-07-17"
}
]
},
{
"application": "YOUR_APPLICATION", // optional. default momondo
"consumer": "YOUR_CONSUMER" // optional. default momondo
},
function (error, solutions) {
console.log(JSON.stringify(error || solutions, null, 2));
});
Get redirects data example:
var momondo = require('momondo');
momondo['10'].redirect(
{
"url": solution.gate.meta.url
},
null,
function (error, redirect) {
console.log(JSON.stringify(error || redirect, null, 2));
});