NodeJS Library for iatacodes.org API
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore init Sep 24, 2016
LICENSE Initial commit Sep 24, 2016
README.md Update README.md Sep 24, 2016
index.js init Sep 24, 2016
package.json 7.0.1 Sep 24, 2016

README.md

nodejs-sdk

NodeJS Library for https://iatacodes.org/

Installation

$ npm install iatacodes

Documentation

https://iatacodes.org/

Examples

const IC = require('iatacodes');

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

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.