iata-search.js

1.2.0 • Public • Published

iata-search.js

axios

GitHub stars npm

iata-search.js is a Node.js module that allows you to headlessly search airline codes from https://www.iata.org/en/about/members/airline-list/ and airport codes from https://www.iata.org/en/publications/directories/code-search/

Installation

With GitHub:

  • Download or clone the project.
  • Go to the iata-search.js folder and run npm install.
  • Require client.js.

With npm:

  • Run npm install iata-search.js.
  • Require the library.

Documentation

Example usage

The library can be used in both CommonJS and ES Modules

Using the library - API

The library is async, be sure to use async functions or .then()

const { Client } = require("iata-search.js");
// OR
import { Client } from "iata-search.js";

const client = new Client();

client.airport("JFK").then((data) => {
    console.log(data);
});
// OR
const getAirport = async () => {
    const data = await client.airport("JFK");
    console.log(data);
};

getAirport();

Credits

Copyright

See the license

Package Sidebar

Install

npm i iata-search.js

Weekly Downloads

19

Version

1.2.0

License

MIT

Unpacked Size

19.9 kB

Total Files

9

Last publish

Collaborators

  • lockblock-dev