Package Exports
- air-port-codes-node
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 (air-port-codes-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Air-port-codes API SDK
The SDK for accessing all 9000+ airport codes and airport data from Air-port-codes API data feed. Use the Air-port-codes service to help you quickly build an auto-complete form for your website or application.
Installation
- First login to your air-port-codes.com account and update your account settings by adding any domains that might need to access the API.
- Make a note of your API Key and your API Secret as you will need them for all requests to the API.
- Install the npm library
npm install air-port-codes-nodeIntegration
Consult the documentation for the appropriate config settings to use.
Also, you can view the Ionic Angular example TypeScript file showing it in practice.
import { autocomplete } from 'air-port-codes-node';
this.apca = autocomplete({
key : 'xxxxxxxxxxx',
secret : 'xxxxxxxxxxxxxxx', // Your API Secret Key: use this if you are not connecting from a web server
limit : 15
});For each request, typically a key press you would make the api request
this.apca.request(term);Then simply listen for the response
// SUCCESS we found some airports
this.apca.onSuccess = (data) => {
console.log('data', data)
};
// FAIL no airports found
this.apca.onError = (data) => {
console.log('onError', data.message);
};Ionic Angular Example Screenshot

License
MIT license | (c) 2016 AIR-PORT-CODES | Air-port-codes.com/legal/terms-of-use