JSPM

airlabs

7.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q54301F
  • License MIT

NodeJS Library for https://airlabs.co/ API

Package Exports

  • airlabs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (airlabs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nodejs-sdk

NodeJS Library for https://airlabs.co/

Installation

$ npm install airlabs

Documentation

https://airlabs.co/

Examples

const IC = require('airlabs');

const ic = new IC('YOUR-API-KEY', 6);

ic.api('airports', {code: 'CDG'}, function(error, response) {
  console.log(response);
});

ic.api('cities', {code: 'PAR'}, function(error, response) {
  console.log(response);
});

ic.api('countries', {code: 'FR'}, function(error, response) {
  console.log(response);
});

ic.api('airlines', {code: 'AF'}, function(error, response) {
  console.log(response);
});

ic.api('routes', {arrival: 'CDG'}, function(error, response) {
  console.log(response);
});

ic.api('autocomplete', {query: 'madrid'}, function(error, response) {
  console.log(response);
});

ic.api('nearby', {lat: -6.1744, lng: 106.8294, distance: 1000}, function(error, response) {
  console.log(response);
});

ic.api('timetable', {code: 'LGA', type: 'departure'}, function(error, response) {
  console.log(response);
});

License

This project is licensed under the MIT license.