amadeus 1.0.0.beta6 → 1.0.0.beta7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 317bd9d6cad6d73e64e60eeb11a7c20c2f858af4d19ed911ec01272b4276e89b
4
- data.tar.gz: 4a3f55ab0b9a58ae32ab392257131956428450b433fd45114526cfa045908607
3
+ metadata.gz: 099d7bf4b27c85e463286035f1b1a460bf06ee2240716d5aa504c225b0512ee9
4
+ data.tar.gz: ac36cd6723725f167c121c2a91d6bb38ac7450b72df4e4270d9142d47cf13968
5
5
  SHA512:
6
- metadata.gz: 1499acbe2d880c597424df6e06d06849cb71b4b61a16ccf55bdaf4ed442ecdc578a4dd16df0eb82e12e45acac90b50fdf1a6818c8956ea447cffd28b091009b7
7
- data.tar.gz: 89379f8c00da7c677e66f1eff6904fb4da6a02ee0c9e2d731a4252801d571648c1cf8fff6ce0b72873e034821dc28ca9410230b52461054940f00c3d707e456f
6
+ metadata.gz: e828a71b9434750d73901a601489789f71e4b802f4cb59eccf4003135af92327bd9e049abea87ba0d48f9418ef9215b80e8f5d9912740558dc7a1e9c13fdbe91
7
+ data.tar.gz: eaa1e93bf96e5a6c911b86fb8713da96783f5bb6cc2ed40b219effeed29b2313fec6f260cb63bedf47fd58d82283c7b33b44c75bc6f0a1bc7149ce43fb492b29
data/README.md CHANGED
@@ -3,26 +3,28 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/amadeus.svg)][gem]
4
4
  [![Build Status](https://travis-ci.org/amadeus4dev/amadeus-ruby.svg?branch=master)][travis]
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/d2e15221a502a7d71144/maintainability)](https://codeclimate.com/github/amadeus4dev/amadeus-ruby/maintainability)
6
- [![Dependencies](.github/images/dependencies.svg)](gem)
7
- [![Contact Support](.github/images/support.svg)][support]
6
+ [![Dependencies](https://github.com/amadeus4dev/amadeus-ruby/raw/master/.github/images/dependencies.svg?sanitize=true)](gem)
7
+ [![Contact Support](https://github.com/amadeus4dev/amadeus-ruby/raw/master/.github/images/support.svg?sanitize=true)][support]
8
8
 
9
9
  Amadeus provides a set of APIs for the travel industry. Flights, Hotels, Locations and more.
10
10
 
11
- For more details see the [Ruby documentation](https://developer.amadeus.com/docs/ruby) on [Amadeus.com](https://developer.amadeus.com) and the [class reference](https://amadeus4dev.github.io/amadeus-ruby) here on GitHub.
11
+ For more details see the [Ruby
12
+ documentation](https://amadeus4dev.github.io/amadeus-ruby/) on
13
+ [Amadeus.com](https://developers.amadeus.com).
12
14
 
13
15
  ## Installation
14
16
 
15
17
  This gem requires Ruby 2.2+. You can install install it directly or via bundler.
16
18
 
17
19
  ```rb
18
- gem 'amadeus', '~> 1.0.0.beta6'
20
+ gem 'amadeus', '~> 1.0.0.beta7'
19
21
  ```
20
22
 
21
- __Next__: [Get Started with the Ruby SDK.](https://developer.amadeus.com/docs/ruby/get_started/initialize)
22
-
23
23
  ## Getting Started
24
24
 
25
- To send make your first API call you will need to [register for an Amadeus Developer Account](https://developer.amadeus.com/register) and [set up your first application](https://dashboard.developer.amadeus.com/applications).
25
+ To send make your first API call you will need to [register for an Amadeus
26
+ Developer Account](https://developers.amadeus.com/create-account) and set up
27
+ your first application.
26
28
 
27
29
  ```rb
28
30
  require 'amadeus'
@@ -40,8 +42,6 @@ rescue Amadeus::ResponseError => error
40
42
  end
41
43
  ```
42
44
 
43
- __Next__: [Learn more about checkin links](https://developer.amadeus.com/docs/ruby/get_started/checkin_links) with our Ruby SDK.
44
-
45
45
  ## Initialization
46
46
 
47
47
  The client can be initialized directly.
@@ -51,35 +51,37 @@ The client can be initialized directly.
51
51
  amadeus = Amadeus::Client.new(client_id: '...', client_secret: '...')
52
52
  ```
53
53
 
54
- Alternatively it can be initialized without any paramters if the environment variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.
54
+ Alternatively it can be initialized without any paramters if the environment
55
+ variables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.
55
56
 
56
57
  ```rb
57
58
  amadeus = Amadeus::Client.new
58
59
  ```
59
60
 
60
- Your credentials can be found on the [Amadeus dashboard](https://dashboard.developer.amadeus.com/client_ids). [Sign up](https://developer.amadeus.com/register) for an account today.
61
+ Your credentials can be found on the [Amadeus
62
+ dashboard](https://developers.amadeus.com/my-apps). [Sign
63
+ up](https://developers.amadeus.com/create-account) for an account today.
61
64
 
62
- By default the environment for the SDK is the `:test` environment. To switch to a production (paid-for) environment please switch the hostname as follows:
65
+ By default the environment for the SDK is the `:test` environment. To switch to
66
+ a production (paid-for) environment please switch the hostname as follows:
63
67
 
64
68
  ```rb
65
69
  amadeus = Amadeus::Client.new(hostname: :production)
66
70
  ```
67
71
 
68
- __Next__: [Learn more about our initializing the Ruby SDK](https://developer.amadeus.com/docs/ruby/get_started_initialize) in our documentation.
69
-
70
72
  ## Documentation
71
73
 
72
- Amadeus has a large set of APIs, and our documentation is here to get you started today.
73
-
74
- * [Get Started](https://developer.amadeus.com/docs/ruby/get_started) documentation
75
- * [Initialize the SDK](https://developer.amadeus.com/docs/ruby/get_started/initialize)
76
- * [Find an Airport](https://developer.amadeus.com/docs/ruby/get_started/find_an_airport)
77
- * [Book a Flight](https://developer.amadeus.com/docs/ruby/get_started/book_a_flight)
78
- * [Get Flight Inspiration](https://developer.amadeus.com/docs/ruby/get_started/get_flight_inspiration)
74
+ Amadeus has a large set of APIs, and our documentation is here to get you
75
+ started today. Head over to our
76
+ [Reference](https://amadeus4dev.github.io/amadeus-ruby/) documentation for
77
+ in-depth information about every SDK method, its arguments and return types.
79
78
 
80
- Alternatively, head over to our [Reference](https://developer.amadeus.com/docs/ruby/reference) documentation for in-depth information about every SDK method, it's arguments and return types.
81
79
 
82
- Additionally, this SDK has extensive documentation of itself available on [RubyDoc.info](http://www.rubydoc.info/gems/amadeus/).
80
+ * [Get Started](https://amadeus4dev.github.io/amadeus-ruby/) documentation
81
+ * [Initialize the SDK](https://amadeus4dev.github.io/amadeus-ruby/)
82
+ * [Find an Airport](https://amadeus4dev.github.io/amadeus-ruby/Amadeus/Namespaces/ReferenceData/Locations/Airports.html)
83
+ * [Find a Flight](https://amadeus4dev.github.io/amadeus-ruby/Amadeus/Namespaces/Shopping/FlightOffers.html)
84
+ * [Get Flight Inspiration](https://amadeus4dev.github.io/amadeus-ruby/Amadeus/Namespaces/Shopping/FlightDestinations.html)
83
85
 
84
86
  ## Making API calls
85
87
 
@@ -153,7 +155,10 @@ amadeus = Amadeus::Client.new(
153
155
  )
154
156
  ```
155
157
 
156
- Additionally, to enable more verbose logging, you can set the appropriate level on your own logger, though the easiest way would be to enable debugging via a parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment variable.
158
+ Additionally, to enable more verbose logging, you can set the appropriate level
159
+ on your own logger, though the easiest way would be to enable debugging via a
160
+ parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment
161
+ variable.
157
162
 
158
163
  ```rb
159
164
  require 'logger'
@@ -167,7 +172,8 @@ amadeus = Amadeus::Client.new(
167
172
 
168
173
  ## Development & Contributing
169
174
 
170
- Want to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for guidance on installing and running this code in a development environment.
175
+ Want to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for
176
+ guidance on installing and running this code in a development environment.
171
177
 
172
178
 
173
179
  ## License
@@ -176,9 +182,12 @@ This library is released under the [MIT License](LICENSE).
176
182
 
177
183
  ## Help
178
184
 
179
- Our [developer support team](https://developer.amadeus.com/developers) is here to help you. You can find us on [Twitter](#), [StackOverflow](#), and [email](#).
185
+ Our [developer support team](https://developers.amadeus.com/support) is here
186
+ to help you. You can find us on
187
+ [StackOverflow](https://stackoverflow.com/questions/tagged/amadeus) and
188
+ [email](mailto:developers@amadeus.com).
180
189
 
181
190
  [gem]: https://rubygems.org/gems/amadeus
182
191
  [travis]: http://travis-ci.org/amadeus4dev/amadeus-ruby
183
- [support]: http://developer.amadeus.com/support
192
+ [support]: http://developers.amadeus.com/support
184
193
  [codeclimate]: https://codeclimate.com/github/amadeus4dev/amadeus-ruby
@@ -25,7 +25,8 @@ require 'amadeus/namespaces/shopping/hotel/offer'
25
25
  require 'amadeus/namespaces/shopping/hotel/hotel_offers'
26
26
  require 'amadeus/namespaces/travel/analytics'
27
27
  require 'amadeus/namespaces/travel/analytics/fare_searches'
28
- require 'amadeus/namespaces/travel/analytics/air_traffics'
28
+ require 'amadeus/namespaces/travel/analytics/air_traffic'
29
+ require 'amadeus/namespaces/travel/analytics/air_traffic/traveled'
29
30
 
30
31
  # The namespace for the files used to make API
31
32
  # calls to the Amadeus travel APIs
@@ -41,7 +41,7 @@ module Amadeus
41
41
  #
42
42
  # @return [Amadeus::Namespaces::Travel]
43
43
  # @example Some of the further namespaces available
44
- # amadeus.travel.analytics.air_traffics
44
+ # amadeus.travel.analytics.air_traffic
45
45
  # amadeus.travel.analytics.fare_searches
46
46
  #
47
47
  def travel
@@ -15,7 +15,7 @@ module Amadeus
15
15
  #
16
16
  # @return [Amadeus::Namespaces::Travel::Analytics]
17
17
  # @example
18
- # amadeus.travel.analytics.air_traffics
18
+ # amadeus.travel.analytics.air_traffic
19
19
  # amadeus.travel.analytics.fare_searches
20
20
  #
21
21
  def analytics
@@ -12,24 +12,25 @@ module Amadeus
12
12
  # amadeus.travel.analytics
13
13
  #
14
14
  class Analytics < Amadeus::Client::Decorator
15
- # The namespace for the AirTraffics API:
15
+ # The namespace for the FareSearches API:
16
16
  #
17
- # @return [Amadeus::Namespaces::Travel::Analytics::AirTraffics]
17
+ # @return [Amadeus::Namespaces::Travel::Analytics::FareSearches]
18
18
  # @example
19
- # amadeus.travel.analytics.air_traffics
19
+ # amadeus.travel.analytics.fare_searches
20
20
  #
21
- def air_traffics
22
- Amadeus::Namespaces::Travel::Analytics::AirTraffics.new(client)
21
+ def fare_searches
22
+ Amadeus::Namespaces::Travel::Analytics::FareSearches.new(client)
23
23
  end
24
24
 
25
- # The namespace for the FareSearches API:
25
+ # The namespace for the travel Analytics APIs:
26
26
  #
27
- # @return [Amadeus::Namespaces::Travel::Analytics::FareSearches]
27
+ # @return [Amadeus::Namespaces::Travel::Analytics]
28
28
  # @example
29
+ # amadeus.travel.analytics.air_traffic
29
30
  # amadeus.travel.analytics.fare_searches
30
31
  #
31
- def fare_searches
32
- Amadeus::Namespaces::Travel::Analytics::FareSearches.new(client)
32
+ def air_traffic
33
+ Amadeus::Namespaces::Travel::Analytics::AirTraffic.new(client)
33
34
  end
34
35
  end
35
36
  end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Amadeus
4
+ module Namespaces
5
+ class Travel
6
+ class Analytics
7
+ # A namespaced client for the
8
+ # +/v1/travel/analytics/air_traffic+ endpoints
9
+ #
10
+ # Access via the +Amadeus::Client+ object
11
+ #
12
+ # amadeus = Amadeus::Client.new
13
+ # amadeus.travel.analytics.air_traffic
14
+ #
15
+ class AirTraffic < Amadeus::Client::Decorator
16
+ # The namespace for the Traveled API:
17
+ #
18
+ # @return
19
+ # [Amadeus::Namespaces::Travel::Analytics::AirTraffic::Traveled]
20
+ # @example
21
+ # amadeus.travel.analytics.air_traffic.traveled
22
+ #
23
+ def traveled
24
+ Amadeus::Namespaces::Travel::Analytics::AirTraffic::Traveled.new(
25
+ client
26
+ )
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Amadeus
4
+ module Namespaces
5
+ class Travel
6
+ class Analytics
7
+ class AirTraffic
8
+ # A namespaced client for the
9
+ # +/v1/travel/analytics/air-traffic/traveled+ endpoints
10
+ #
11
+ # Access via the +Amadeus::Client+ object
12
+ #
13
+ # amadeus = Amadeus::Client.new
14
+ # amadeus.travel.analytics.air_traffic.traveled
15
+ #
16
+ class Traveled < Amadeus::Client::Decorator
17
+ # Returns a list of air traffic reports.
18
+ #
19
+ # @option params [String] :origin IATA code of the origin city -
20
+ # e.g. BOS for Boston - required
21
+ # @option params [String] :query period when consumers
22
+ # are travelling
23
+ # in YYYY-MM format
24
+ # @return [Amadeus::Response] a parsed response
25
+ # @raise [Amadeus::Base] an exception if the call failed
26
+ # @example Find the air traffic from LHR in January 2011
27
+ # amadeus.travel.analytics.air_traffic.traveled.get(
28
+ # origin: 'LHR',
29
+ # period: '2017-03'
30
+ # )
31
+ #
32
+ def get(params = {})
33
+ client.get('/v1/travel/analytics/air-traffic/traveled', params)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Amadeus
4
4
  # The current client version
5
- VERSION = '1.0.0.beta6'.freeze
5
+ VERSION = '1.0.0.beta7'.freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amadeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta6
4
+ version: 1.0.0.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amadeus
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-04-06 00:00:00.000000000 Z
12
+ date: 2018-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
@@ -223,7 +223,8 @@ files:
223
223
  - lib/amadeus/namespaces/shopping/hotel_offers.rb
224
224
  - lib/amadeus/namespaces/travel.rb
225
225
  - lib/amadeus/namespaces/travel/analytics.rb
226
- - lib/amadeus/namespaces/travel/analytics/air_traffics.rb
226
+ - lib/amadeus/namespaces/travel/analytics/air_traffic.rb
227
+ - lib/amadeus/namespaces/travel/analytics/air_traffic/traveled.rb
227
228
  - lib/amadeus/namespaces/travel/analytics/fare_searches.rb
228
229
  - lib/amadeus/version.rb
229
230
  homepage: https://github.com/amadeus4dev/amadeus-ruby
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Amadeus
4
- module Namespaces
5
- class Travel
6
- class Analytics
7
- # A namespaced client for the
8
- # +/v1/travel/analytics/air-traffics+ endpoints
9
- #
10
- # Access via the +Amadeus::Client+ object
11
- #
12
- # amadeus = Amadeus::Client.new
13
- # amadeus.travel.analytics.air_traffics
14
- #
15
- class AirTraffics < Amadeus::Client::Decorator
16
- # Returns a list of air traffic reports.
17
- #
18
- # @option params [String] :origin IATA code of the origin city -
19
- # e.g. BOS for Boston - required
20
- # @option params [String] :query period when consumers are travelling
21
- # in YYYY-MM format
22
- # @return [Amadeus::Response] a parsed response
23
- # @raise [Amadeus::Base] an exception if the call failed
24
- # @example Find the air traffic from LHR in January 2011
25
- # amadeus.travel.analytics.air_traffics.get(
26
- # origin: 'LHR',
27
- # period: '2011-01'
28
- # )
29
- #
30
- def get(params = {})
31
- client.get('/v1/travel/analytics/air-traffics', params)
32
- end
33
- end
34
- end
35
- end
36
- end
37
- end