Class: SabreDevStudio::Flight::Api
- Inherits:
-
Object
- Object
- SabreDevStudio::Flight::Api
- Defined in:
- lib/sabre_dev_studio-flight/api.rb
Class Method Summary collapse
-
.airports_at_cities_lookup(options) ⇒ Object
Airports At Cities Lookup.
-
.city_pairs_lookup(options) ⇒ Object
City Pairs Lookup.
-
.destination_finder(options) ⇒ Object
(also: destination_air_shop)
Shop for a destination (from a list of generalized destinations) given a date range.
-
.fare_range(options) ⇒ Object
Fare Range.
-
.instaflights_search(options) ⇒ Object
(also: single_date_air_shop)
Shop for a fare with an origin for a destination with departure and return dates.
-
.lead_price_calendar(options) ⇒ Object
(also: future_dates_lead_fare_shop)
Future Dates Lead Fare Search, aka “Calendar Lead”.
-
.low_fare_forecast(options) ⇒ Object
Low Fare Forecast.
-
.multiairport_city_lookup(options) ⇒ Object
Multi-Airport City Lookup.
-
.theme_airport_lookup(theme) ⇒ Object
Theme Airport Lookup.
-
.travel_seasonality(destination) ⇒ Object
Travel Seasonality.
-
.travel_theme_lookup ⇒ Object
(also: air_shopping_themes)
List of Air Shopping Themes.
Class Method Details
.airports_at_cities_lookup(options) ⇒ Object
Airports At Cities Lookup
Documentation:
developer.sabre.com/docs/read/rest_apis/airports_at_cities_lookup
Example:
= { :city => 'NYC' }
city_pairs = SabreDevStudio::Flight::Api.airports_at_cities_lookup()
203 204 205 206 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 203 def self.airports_at_cities_lookup() endpoint = '/v1/lists/airports' SabreDevStudio::Flight::AirportsAtCitiesLookup.new(endpoint, ) end |
.city_pairs_lookup(options) ⇒ Object
City Pairs Lookup
Documentation:
developer.sabre.com/docs/read/rest_apis/city_pairs_lookup
Example:
= {
:origincountry => 'US',
:destinationcountry => 'US'
}
city_pairs = SabreDevStudio::Flight::Api.city_pairs_lookup
175 176 177 178 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 175 def self.city_pairs_lookup() endpoint = '/v1/lists/airports/supported/origins-destinations' SabreDevStudio::Flight::CityPairsLookup.new(endpoint, ) end |
.destination_finder(options) ⇒ Object Also known as: destination_air_shop
Shop for a destination (from a list of generalized destinations) given a date range
Documentation:
developer.sabre.com/docs/read/rest_apis/destination_finder
Note: Timezones are specific to the departure and arrival airports (but not specified).
Example:
= {
:origin => 'LAS',
:departuredate => '2014-06-22',
:returndate => '2014-06-23',
:theme => 'MOUNTAINS'
}
fares = SabreDevStudio::Flight::Api.destination_finder()
59 60 61 62 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 59 def self.destination_finder() endpoint = '/v1/shop/flights/fares' SabreDevStudio::Flight::DestinationFinder.new(endpoint, ) end |
.fare_range(options) ⇒ Object
Fare Range
Documentation:
developer.sabre.com/docs/read/rest_apis/fare_range
Example:
= {
:origin => 'JFK',
:destination => 'LAX',
:earliestdeparturedate => '2014-06-01',
:latestdeparturedate => '2014-06-01',
:lengthofstay => 4
}
fare_range = SabreDevStudio::Flight::Api.fare_range()
145 146 147 148 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 145 def self.fare_range() endpoint = '/v1/historical/flights/fares' SabreDevStudio::Flight::FareRange.new(endpoint, ) end |
.instaflights_search(options) ⇒ Object Also known as: single_date_air_shop
Shop for a fare with an origin for a destination with departure and return dates
Documentation:
developer.sabre.com/docs/read/rest_apis/instaflights_search
Example:
= {
:origin => 'ATL',
:destination => 'LAS',
:departuredate => '2014-06-22',
:returndate => '2014-06-23',
:limit => 10,
:sortby => 'totalfare',
:order => 'asc',
:sortby2 => 'departuretime',
:order2 => 'dsc'
}
itineraries = SabreDevStudio::Flight::Api.instaflights_search(); nil
105 106 107 108 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 105 def self.instaflights_search() endpoint = '/v1/shop/flights' SabreDevStudio::Flight::InstaflightsSearch.new(endpoint, ) end |
.lead_price_calendar(options) ⇒ Object Also known as: future_dates_lead_fare_shop
Future Dates Lead Fare Search, aka “Calendar Lead”
Documentation:
developer.sabre.com/docs/read/rest_apis/lead_price_calendar
Note: Timezones are specific to the departure and arrival airports (but not specified).
Example:
= {
:origin => 'ATL',
:destination => 'LAS',
:lengthofstay => 5
}
fares = SabreDevStudio::Flight::Api.lead_price_calendar()
80 81 82 83 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 80 def self.lead_price_calendar() endpoint = '/v1/shop/flights/fares' SabreDevStudio::Flight::LeadPriceCalendar.new(endpoint, ) end |
.low_fare_forecast(options) ⇒ Object
Low Fare Forecast
Documentation:
developer.sabre.com/docs/rest_apis/low_fare_forecast
Example:
= {
:origin => 'JFK',
:destination => 'LAX',
:departuredate => '2014-10-01',
:returndate => '2014-10-05'
}
forecast = SabreDevStudio::Flight::Api.low_fare_forecast()
125 126 127 128 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 125 def self.low_fare_forecast() endpoint = '/v1/forecast/flights/fares' SabreDevStudio::Flight::LowFareForecast.new(endpoint, ) end |
.multiairport_city_lookup(options) ⇒ Object
Multi-Airport City Lookup
Documentation:
developer.sabre.com/docs/read/rest_apis/multiairport_city_lookup
Example:
= { :country => 'US' }
city_pairs = SabreDevStudio::Flight::Api.multiairport_city_lookup()
189 190 191 192 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 189 def self.multiairport_city_lookup() endpoint = '/v1/lists/cities' SabreDevStudio::Flight::MultiairportCityLookup.new(endpoint, ) end |
.theme_airport_lookup(theme) ⇒ Object
Theme Airport Lookup
Documentation:
developer.sabre.com/docs/read/rest_apis/theme_airport_lookup
Example:
airports = SabreDevStudio::Flight::Api.theme_airport_lookup('BEACH')
38 39 40 41 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 38 def self.theme_airport_lookup(theme) endpoint = "/v1/shop/themes/#{theme}" SabreDevStudio::Flight::ThemeAirportLookup.new(endpoint) end |
.travel_seasonality(destination) ⇒ Object
Travel Seasonality
Documentation:
developer.sabre.com/docs/read/rest_apis/travel_seasonality
Example:
travel_seasonality = SabreDevStudio::Flight::Api.travel_seasonality('DFW')
158 159 160 161 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 158 def self.travel_seasonality(destination) endpoint = "/v1/historical/flights/#{destination}/seasonality" SabreDevStudio::Flight::TravelSeasonality.new(endpoint) end |
.travel_theme_lookup ⇒ Object Also known as: air_shopping_themes
List of Air Shopping Themes
Documentation:
developer.sabre.com/docs/read/rest_apis/travel_theme_lookup
Example:
air_shopping_themes = SabreDevStudio::Flight::Api.travel_theme_lookup
24 25 26 27 |
# File 'lib/sabre_dev_studio-flight/api.rb', line 24 def self.travel_theme_lookup endpoint = '/v1/shop/themes' SabreDevStudio::Flight::TravelThemeLookup.new(endpoint) end |