FlightStats
Install via npm
$ npm install --save flightstats
Index
Usage
var FlightStatsAPI = require( 'flightstats' )
var api = new FlightStatsAPI({
appId: 'xxxxxxxxxx',
apiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
userAgent: 'FlightBot',
})
Get a list of airlines
api.getAirlines( options, callback )
var options = {
all: {Boolean},
date: {Date},
iata: {String},
icao: {String},
fs: {String},
}
Look up a flight by airline & flight number
api.lookup( options, callback )
var options = {
date: {Date},
airlineCode: {String},
flightNumber: {String},
airport: {String},
direction: {String},
extendedOptions: {Array},
}
Testing
You'll need FlightStats API credentials to run the tests;
Save them to an .env
file in the repository root:
FLIGHTSTATS_APP_ID = xxxxxxxxxx
FLIGHTSTATS_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxx
Running the tests:
$ npm test
API Reference
See docs/API.md