Skip to content

UberChili/search_flights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

search_flights

Simple API that retrieves flight information from the Amadeus API

Idea

Designed in the Go Programming Language using the Gin framework. This API consults the Self-Servide APIs from Amadeus, retrieves a JSON file and parses it to get:

  • Origin: IATA and country codes of origin airport
  • Destination: IATA and country codes of destination airport
  • Airline
  • Flight number
  • Price in USD

as output in JSON format.

Prerequisites

  • Go 1.16 or later
  • Amadeus API credentials (API Key and API Secret)

Usage

  1. Clone the repository:
git clone [email protected]:UberChili/search_flights.git
  1. Set the Amadeus API credentials as environment variables:
export AMAD_API_KEY=[amadeus-api-key]
export AMAD_API_SECRET=[amadeus-api-secret]
  1. Build and run the application:
go build -o search_flights
./search_flights
# or:
go run .

The API will be available at http://localhost:8080

API Endpoints

  • GET /flights/:origin/:destination: Retrieves a list of flights between the specified origin and destination.

Example request: http://localhost:8080/flights/MEX/MTY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages