Skip to content

Spec, Proto, and Scripts to etl, and access IATA airline information.

Notifications You must be signed in to change notification settings

hampgoodwin/iata-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IATA-FINDER

Special thanks to openflights for making this high quality data readily available for use in multiple formats.

This repository contains:

  1. A gRPC proto spec & implementation for iata-finder
  2. A dataservice which fetches a .csv of airports and airline data from open flights, sanitizes and stores in a poor-mans memory cache
  3. A RPC server (in process)

Table of Contents

Background

I was having trouble finding an API that easily made available airport & airline codes with associated information for free. I thought I should use this chance to make my own project exploring some development concepts I have not yet had the chance to touch, such as API development, RPC, Docker, data scraping in Go, and Open Source.

Install

Configs Check the ./configs directory for any .example.toml files, copy them and drop the .example. Fill out the values appropriately. Each config should have comments that explain what any non-obvious or standard values should be.

To start the service, run make which handles the creation of the docker image and creates a container from it.

Usage

The server can be consumed by any RPC calling service. The .proto file could be used to write a client for consumption. A testing tool like Evans CLI could be used to call services as a one-off, or for testing as you build your client.

An example of using Evans CLI to test could be like:

> make
> evans --host 0.0.0.0 rpc/iatafinder.proto
> call GetAirportIATA
> JFK # or other valid airport IATA code
{
  "id": 3797,
  "name": "John F Kennedy International Airport",
  "city": "New York",
  "country": "United States",
  "iata": "JFK",
  "icao": "KJFK",
  "latitude": 40.63980103,
  "longitude": -73.77890015,
  "altitude": 13,
  "timezone": "America/New_York",
  "daylightSavingsTime": "A",
  "type": "airport",
  "source": "OurAirports"
}

About

Spec, Proto, and Scripts to etl, and access IATA airline information.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published