0.0.3 • Published 5 years ago

@danielmoraes/fly v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Install

To install Fly for use in Node.js with require('@danielmoraes/fly'), run:

npm install @danielmoraes/fly

To install a fly-cli command line app, run:

npm install @danielmoraes/fly-cli -g

Usage

In Node.js

import { findLowestFares } from '@danielmoraes/fly'

findLowestFares('sao', 'rio', '2019-01-01')
  .then(response => { console.log(response) }

As a command line app

Fly is also available as a command line app. Here's how to use it:

$ npm install @danielmoraes/fly-cli -g
$ fly-cli --help

To make a query:

$ fly-cli search sao rio 2019-01-01
{ sources:
   [ { sourceName: 'Avianca', lowestFare: 169 },
     { sourceName: 'Azul', lowestFare: 187.1 },
     { sourceName: 'Gol', lowestFare: 175.17 },
     { sourceName: 'Latam', lowestFare: 195.84 } ],
  lowestFare: 169 }

License

MIT. Copyright (c) Daniel Moraes.