GithubHelp home page GithubHelp logo

cheapest-airfare-voi's Introduction

cheapest-airfare-voi

️ Get the cheapest airfare of a Volaris flight

Build Status

Install

Ensure you have Node.js version 4+ installed.

npm install --save alebelcor/cheapest-airfare-voi

An npm package is intentionally not provided.

Usage

const cheapestAirfareVoi = require('cheapest-airfare-voi');

const options = {
  from: 'TIJ',
  to: 'MEX',
  departure: '2017-05-10',
  return: '2017-05-20'
};

fn(options).then(result => {
  console.log(result);
  //=> { 'total': 2672, 'source': 'https://www.volaris.com/Flight/Select?o1=TIJ&d1=MEX&dd1=05/10/2017&o2=MEX&d2=TIJ&dd2=05/20/2017&cc=MXN' }
}); 

API

cheapestAirfareVoi(options)

Returns a Promise for a result object with a total property (lowest total) and a source property (for more information).

options

Type: object

An object representing the parameters for the search.

from

Type: string

Origin airport IATA code.

to

Type: string

Destination airport IATA code.

departure

Type: string

Departure date in YYYY-MM-DD.

return (optional)

Type: string

Return date in YYYY-MM-DD. Leave out if it's a one-way flight.

Related

License

MIT © Alejandro Beltrán

Disclaimer

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.

cheapest-airfare-voi's People

Contributors

alebelcor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.