fake-or-dead / amadeus-ruby

for Hosting Swagger API from Amadeus Documents to import as Gem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swagger_client

SwaggerClient - the Ruby gem for the Amadeus Travel Innovation Sandbox

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.2
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen For more information, please visit https://sandbox.amadeus.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-1.0.0.gem

(for development, run gem install --dev ./swagger_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'swagger_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/fake-or-dead/amadeus-ruby, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/fake-or-dead/amadeus-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'swagger_client'

api_instance = SwaggerClient::DefaultApi.new

apikey = "apikey_example" # String | API Key provided for your account, to identify you for API access. Make sure to keep this API key secret.

term = "Ban" # String | Search keyword that should represent the start of a word in a city or airport name.

opts = {
  country: "US", # String | Identified a country based of a <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2#Current_codes\">ISO 3166-1 alpha-2 code</a>
  all_airports: false # BOOLEAN | Boolean to include or not all airports, no matter their traffic rank. False by default, to only display relevant airports.
}

begin
  #Airport Autocomplete - Find an IATA location code for flight search based on a city or airport name using the term parameter. By only using the country parameter, this API is also able to find all the IATA location codes associated with a country. Both term and country parameters can be used together to filter the results accordingly. The API is fully JQuery-Autocomplete compatible to enable you to quickly build a drop-down list for your users to find the right airport easily.
  result = api_instance.airport_autocomplete(apikey, term, opts)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling DefaultApi->airport_autocomplete: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.sandbox.amadeus.com/v1.2

Class Method HTTP request Description
SwaggerClient::DefaultApi airport_autocomplete GET /airports/autocomplete Airport Autocomplete - Find an IATA location code for flight search based on a city or airport name using the term parameter. By only using the country parameter, this API is also able to find all the IATA location codes associated with a country. Both term and country parameters can be used together to filter the results accordingly. The API is fully JQuery-Autocomplete compatible to enable you to quickly build a drop-down list for your users to find the right airport easily.
SwaggerClient::DefaultApi car_rental_airport_search GET /cars/search-airport Car Rental Airport Search - Find car rental providers and rates when you provide an airport code, as well as the pick-up and drop-off dates. Optional parameters such as currency and rental provider codes are also available and can be used to narrow down the results. This API is an ideal pairing with the flight and hotel search to provide ground transportation options at the destination.
SwaggerClient::DefaultApi car_rental_geosearch GET /cars/search-circle Car Rental Geosearch - Locate car rental providers and available vehicles when you define a circular area with one coordinate and radius, as well as the pick-up and drop-off dates. Optional parameters such as currency and rental provider codes are also available and can be used to narrow down the results. This API is an ideal pairing with the flight and hotel search to provide ground transportation options at the destination.
SwaggerClient::DefaultApi flight_affiliate_search GET /flights/affiliate-search Flight Affiliate Search - Use Travel Audience Connect's affiliate network API to search flights from our list of partners and provides deep-links to allow the user to book directly on the airline website.
SwaggerClient::DefaultApi flight_extensive_search GET /flights/extensive-search Flight Extensive Search - Build travel searches based on very flexible and open range of dates. You can use it to answer questions such as "When is the best date to fly...". It's built on Amadeus' Featured Results technology, which returns thousands of results (prices, itineraries and dates) in a matter of milliseconds. Results are available over half a calendar year with a 1 to 15 day stay duration
SwaggerClient::DefaultApi flight_inspiration_search GET /flights/inspiration-search Flight Inspiration Search - Go beyond the traditional search by origin, destination and dates to meet the needs of travelers looking for suggestions and a search experience that reflects the way they choose their trip. This can help you answer the question "Where can I go within a given travel budget?"
SwaggerClient::DefaultApi flight_low_fare_search GET /flights/low-fare-search Flight Low-Fare Search - Find the cheapest one way or return itineraries and fares between two airports at specific dates.
SwaggerClient::DefaultApi flight_traffic_api GET /travel-intelligence/flight-traffic Flight Traffic API - Find the true origin and destination traffic summary between two journey points over a specified period. This can help you answer questions like "What cities are people coming from to visit Los Angeles between January through April of 2015"
SwaggerClient::DefaultApi hotel_airport_search GET /hotels/search-airport Hotel Airport Search - Locate the cheapest available rooms near a given airport, for a given stay period. This API is ideal if you want to connect flight and hotels. Provide an IATA airport code, as well as the check-in and check-out dates, and get a list of up to 140 properties (names, codes, image, amenities) with their locations and rates. Optional parameters such as currency and maximum rates, amenities or hotel chain codes are also available and can be used to narrow down the results. More optional parameters such as show_sold_out & rooms can be used to show sold out rooms and all available rooms.
SwaggerClient::DefaultApi hotel_geosearch_by_box GET /hotels/search-box Hotel Geosearch by box - Locate the cheapest available rooms within a given rectangular region for a given stay period. It's ideal for displaying results on a map.
SwaggerClient::DefaultApi hotel_geosearch_by_circle GET /hotels/search-circle Hotel Geosearch by Circle API - Locate the cheapest available rooms within a given radius of a defined point for a given stay period.
SwaggerClient::DefaultApi hotel_property_code_search GET /hotels/{property_code} Hotel Property Code Search - Find out more room and rate information once you have found your preferred hotel.
SwaggerClient::DefaultApi location_information GET /location/{code} Location Information - Find more information about any IATA city or airport location code. With this API, you can find information such as city and airport names and locations, as well as information on timezones and airport usage.
SwaggerClient::DefaultApi nearest_relevant_airport GET /airports/nearest-relevant Nearest Relevant Airport - Find the most useful nearby airport to a given location.
SwaggerClient::DefaultApi rail_station_autocomplete GET /rail-stations/autocomplete Rail Station Autocomplete - Transform user input into a unique rail station code. Currently only French and Italian stations are supported.
SwaggerClient::DefaultApi rail_station_information GET /rail-station/{id} Rail-Station Information - Retrieve the rail station information corresponding to an Amadeus UIC rail station ID. Currently only French and Italian stations are supported.
SwaggerClient::DefaultApi top_flight_destinations GET /travel-intelligence/top-destinations Top Flight Destinations - Find the most popular flight destinations from an origin during a period. This can help you answer questions like "Where are most people going to from Paris during the month of September?"
SwaggerClient::DefaultApi top_flight_searches GET /travel-intelligence/top-searches Top Flight Searches - Find the most popular flight searches from an origin in a during given search period. This can help you answer questions like "Where are people looking to travel from Paris during the month of September?"
SwaggerClient::DefaultApi train_extensive_search GET /trains/extensive-search Train Extensive Search - Provides multi-day availability and a variety of schedule and pricing options to travel to your destination instantly. Supports SNCF French trains only.
SwaggerClient::DefaultApi train_schedule_search GET /trains/schedule-search Train Schedule Search - Suggest destinations from your chosen departure station. Supports SNCF French Rail only.
SwaggerClient::DefaultApi travel_record_retrieve GET /travel-record/{record_locator} Travel Record Retrieve - Enable travelers to explore the details of their journeys stored in the Amadeus system using our Retrieve Travel Record API.
SwaggerClient::DefaultApi yap_q_city_name_search GET /points-of-interest/yapq-search-text YapQ City Name Search - Find landmarks and attractions in a given city.
SwaggerClient::DefaultApi yap_q_geosearch GET /points-of-interest/yapq-search-circle YapQ Geosearch - Find landmarks and attractions near a given point.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

for Hosting Swagger API from Amadeus Documents to import as Gem


Languages

Language:Ruby 99.8%Language:Shell 0.2%