Class: Amadeus::Namespaces::Travel::Analytics::AirTraffic::BusiestPeriod

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.rb

Overview

A namespaced client for the /v1/travel/analytics/air-traffic/busiest-period endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.travel.analytics.air_traffic.busiest_period

Instance Method Summary collapse

Instance Method Details

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

Returns the months of the selected year, ordered from busiest to least busy.

arrivals and departures (default: arrivals) - required

Examples:

What was the busiest travel period in 2017

amadeus.travel.analytics.air_traffic.busiest_period.get(
  cityCode: 'MAD',
  period: '2017',
  direction: Amadeus::Direction::ARRIVING
)

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :cityCode (String)

    IATA code of the origin city - e.g. BOS for Boston - required

  • :period (String)

    period when consumers are travelling in YYYY format - required

  • :direction (String)

    to select between

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



35
36
37
38
# File 'lib/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.rb', line 35

def get(params = {})
  client.get('/v1/travel/analytics/air-traffic/busiest-period',
             params)
end