Socket
Socket
Sign inDemoInstall

schiphol-client-js

Package Overview
Dependencies
63
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

schiphol-client-js

A Node.js wrapper for Schiphol API


Version published
Maintainers
1
Weekly downloads
3

Weekly downloads

Readme

Source

schiphol-client-js

Build Status on Travis

A Node.js wrapper for Schiphol Flight API. For more details about the Schiphol Flight API, you can always refer to here. This wrappers contains both v1 and v3 version endpoints from the API.

Usage

Use the following command to install and save the package in your package.json:

npm install schiphol-client-js --save

To use the client, first import the package and call a query as follows. Each query will return a promise for further chaining.

var Client = require('schiphol-client-js');

var client = new Client('yourAppId', 'yourAppKey');

client.findFlights().then((data) => {
  console.log(data);
}).catch((error) => {
  console.log(error);
});

To run the tests:

npm test

API

Note that for all the following params, all parameters should be wrapped in a object and passed to the API.

client.findFlights(params)

Return all flights of a specific date. If no parameters are passed, the flights of today will be returned. An example:

var params = {
  airline: 'KL',
  flightdirection: 'A'
}

For all possible parameters, please check here.

client.findOneFlightById(id)

Retrieve one flight by its ID. The input ID is mandatory for this function and should be a string.

client.findOneCodeshare(id, flightName)

Retrieve a codeshare by the ID and the name of a flight. Both input parameters are mandatory. The ID is a string and the flightName should be a string.

client.findDestinations(params)

Retrieve a list of destinations. If no parameters are passed, all possible destinations will be returned. For all possible parameters, see here.

client.findOneDestinationByIATA(iata)

Retrieve one desitination based on IATA code. The input IATA code is mandatory. An IATA code should be a string.

client.findAircraftTypes(params)

Retrieve a list of all aircraft types. If no paramters are passed, all aircraft types will be returned. For all optional input parameters, please check here.

client.findAirlines(params)

Retrieve a list of airlines. If no paramters are passed, all possible airlines will be returned. For all optional input parameters, see here.

client.findOneAirlineByAirlineCode(airlineCode)

Retrieve an airline based on an airline code, either IATA code or ICAO code. The input airline code is mandatory. An airline code should be a string.

Keywords

FAQs

Last updated on 21 Nov 2017

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