️ Get the cheapest airfare of a VivaAerobus flight
Ensure you have Node.js version 4+ installed.
npm install --save alebelcor/cheapest-airfare-viv
An npm package is intentionally not provided.
const cheapestAirfareViv = require('cheapest-airfare-viv');
const options = {
from: 'TIJ',
to: 'MEX',
departure: '2017-05-10',
return: '2017-05-20'
};
fn(options).then(result => {
console.log(result);
//=> { total: 1779.29, source: 'https://www.vivaaerobus.com/Booking/PostCriteria?DepartureCity=TIJ&ArrivalCity=MEX&Adults=1&DepartureDate=2017-05-10&ReturnDate=2017-05-20&Currency=MXN' }
});
Returns a Promise for a result object with a total
property (lowest total) and a source
property (for more information).
Type: object
An object representing the parameters for the search.
Type: string
Origin airport IATA code.
Type: string
Destination airport IATA code.
Type: string
Departure date in YYYY-MM-DD
.
Type: string
Return date in YYYY-MM-DD
. Leave out if it's a one-way flight.
- cheapest-airfare-amx - Get the cheapest airfare of an Aeroméxico flight
- cheapest-airfare-voi - Get the cheapest airfare of a Volaris flight
MIT © Alejandro Beltrán
This was made for illustrative purposes. I do not own the content generated by this tool. All rights belong to their respective owners. No copyright infringement intended.