Class: Amadeus::Namespaces::ReferenceData::Locations::Airports

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/reference_data/locations/airports.rb

Overview

A namespaced client for the /v1/reference-data/locations/airports endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.reference_data.locations.airports

Instance Method Summary collapse

Instance Method Details

#get(params = {}) ⇒ Amadeus::Response

Returns a list of relevant airports near to a given point.

Examples:

Find the nearest airport to the 49.0000,2.55 lat/long

amadeus.reference_data.locations.airports.get(
  longitude: 49.0000,
  latitude: 2.55
)

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :latitude (Double)

    latitude location to be at the center of the search circle - required

  • :longitude (Double)

    longitude location to be at the center of the search circle - required

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



31
32
33
# File 'lib/amadeus/namespaces/reference_data/locations/airports.rb', line 31

def get(params = {})
  client.get('/v1/reference-data/locations/airports', params)
end