npm install
CREATE DATABASE flightapi;
CREATE TABLE api_keys ( id SERIAL PRIMARY KEY, api_key VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT NOW())
INSERT INTO api_keys (api_key) VALUES ('abc123'), ('def456'), ('ghi789'), ('jkl012'), ('mno345')
CREATE TABLE airport_data ( icao VARCHAR(4), iata VARCHAR(3), name VARCHAR(255), city VARCHAR(255), state VARCHAR(255), country VARCHAR(255), elevation INTEGER, lat FLOAT, lon FLOAT, tz VARCHAR(255))
node utils/batchInsert.js
npm start
if httpS doesn't work, please use HTTP
Invoke-WebRequest -Uri 'https://flight.thenewabacus.com/api/flights/RPLL/KJFK' -Headers @{'api-key' = 'mno345'}
curl --location --request GET 'https://flight.thenewabacus.com/api/flights/RPLL/KJFK'--header 'api-key: mno345'
{
"INR": {
"fareAIrIndia": "54782.27",
"fareIndigo": "82173.41",
"fareSpiceJet": "95868.98",
"fareVistara": "109564.55"
}
}
REFERENCES: