Socket
Socket
Sign inDemoInstall

flightstats

Package Overview
Dependencies
10
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flightstats

FlightStats API Client


Version published
Weekly downloads
2
Maintainers
1
Install size
5.34 MB
Created
Weekly downloads
 

Changelog

Source

0.21.0

  • 63282a77232e1e814a3ae094dfb35282b6ce09f2 - lib: Remove use of deprecated request module
  • d2431b48cdd67b074686ae083d56978bbaa86013 - package: Update dependencies
  • 969a8a83ca7f3473e619e71794aa7983303971d5 - remove config key config
  • e6c759ec11eaef69d00dd70f4a4290801aaaf012 - :fire: modify init config for flightstate

Readme

Source

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

Keywords

FAQs

Last updated on 25 Feb 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc