0.21.0 • Published 4 years ago

flightstats v0.21.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

FlightStats

npm npm license npm downloads build status

Install via npm

$ npm install --save flightstats

Index

Usage

var FlightStatsAPI = require( 'flightstats' )
var api = new FlightStatsAPI({
  appId: 'xxxxxxxxxx',
  apiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
  // optional, defaults to `node flightstats/{package.version}`
  userAgent: 'FlightBot',
})

Get a list of airlines

// Options are optional;
// defaults to retrieve all currently active airlines
api.getAirlines( options, callback )
// Options (iata, icao, fs are mutually exclusive):
var options = {
  all: {Boolean},
  date: {Date},
  iata: {String},
  icao: {String},
  fs: {String},
}

Look up a flight by airline & flight number

api.lookup( options, callback )
// Options:
var options = {
  date: {Date},
  airlineCode: {String},
  flightNumber: {String},
  airport: {String}, // optional
  direction: {String}, // optional, defaults to `arriving`
  extendedOptions: {Array}, // optional
}

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

0.21.0

4 years ago

0.20.0

6 years ago

0.19.3

6 years ago

0.19.2

7 years ago

0.19.1

7 years ago

0.19.0

7 years ago

0.18.0

7 years ago

0.17.2

7 years ago

0.17.1

8 years ago

0.17.0

8 years ago

0.16.0

8 years ago

0.15.1

8 years ago

0.15.0

8 years ago

0.14.6

8 years ago

0.14.5

8 years ago

0.14.4

8 years ago

0.14.3

8 years ago

0.14.2

8 years ago

0.14.1

8 years ago

0.14.0

8 years ago

0.13.0

8 years ago

0.12.1

8 years ago

0.12.0

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.0

8 years ago

0.9.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago