Class: SacsRuby::API::TravelSeasonality

Inherits:
Base
  • Object
show all
Defined in:
lib/sacs_ruby/api/travel_seasonality.rb

Overview

The Travel Seasonality API returns a traffic volume rating for each week of the year for a given destination. In total, each request returns a booked traffic volume rating of low, medium or high for each week (1-52) of the next year for a given destination. Each week is compared with the traffic volume of the other 51 weeks. The API then calculates whether that week is high or low seasonality, e.g., week 32 is compared with the 1st, 2nd, 3rd … 33rd, 34th, 35th… 52nd weeks.

Instance Attribute Summary

Attributes inherited from Base

#opts, #results, #token, #url

Instance Method Summary collapse

Methods inherited from Base

get, #get, #initialize, #valid?

Constructor Details

This class inherits a constructor from SacsRuby::Base

Instance Method Details

#endpoint_urlObject



18
19
20
# File 'lib/sacs_ruby/api/travel_seasonality.rb', line 18

def endpoint_url
  "/v1/historical/flights/#{opts.delete(:destination)}/seasonality"
end

#required_varsObject



14
15
16
# File 'lib/sacs_ruby/api/travel_seasonality.rb', line 14

def required_vars
  %i(destination)
end