amadeus 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffd090d42d800bbfae01e30b095e6907ee66922875eb38e81e83d0dfcf93688c
4
- data.tar.gz: 1d34a30f43448bae789456f43fb2e96ce89abd63561b7318aec8086dc3b9bf0f
3
+ metadata.gz: a4a23a2c80c517339250f297ad7387205daf2614b170c42a86e3bbb9325bfa67
4
+ data.tar.gz: 8af63e1c90db57ea0d0390a8b8d6965bb4ed8499b1749a5ed23e73ce7a0c0003
5
5
  SHA512:
6
- metadata.gz: 3005646311109b6551347efd3ebe559d6f091e9210a84d77666f898e1a12e3f4f7c5166b2d49ddc9af8c67c859c1d7ae45b156656b917d3fe081ee339de81cc9
7
- data.tar.gz: 65046569d983b9a988de5fee812b5a38e85311963161f9b9e94841b8f9cb98e524cb2c7e2e162b8f64dd27fdc085213d2a3d65a54ae93f872d40fd4f73082d6a
6
+ metadata.gz: 9faf86fecd19ff97b2923f4de98a921527629576a3db17e95a4ff4744a1201c83dbe56e40ba6634d5aa8feac17683d2270dcb8084c40331cedbf653f4195d30a
7
+ data.tar.gz: 5270563733e24fbe0e7fdbf60712f3c7c4fd305ae534576ac6a3e5f7d60cdf4c410bfb5bbf069d318fa7593f27c29fd1e8de7a910337b432196acaa9a9be98d3
@@ -1,4 +1,9 @@
1
1
  # Changelog
2
+ ## 3.1.0 - 2019-03-25
3
+ Release of the [Point of Interest API](https://developers.amadeus.com/self-service/category/210/api-doc/55)
4
+
5
+ > The Points Of Interest API, powered by AVUXI TopPlace, is a search API that returns a list of popular places for a particular location. The location can be defined as area bound by four coordinates or as a geographical coordinate with a radius. The popularity of a place or 'point of interest' is determined by AVUXI's proprietary algorithm that considers factors such as ratings, check-ins, category scores among other factors from a host of online media sources.
6
+
2
7
  ## 3.0.0 - 2019-01-22
3
8
 
4
9
  ## Hotel Search v2 has been deployed (Hotel Search v1 is now deprecated)
data/README.md CHANGED
@@ -178,7 +178,7 @@ amadeus = Amadeus::Client.new(
178
178
  amadeus.shopping.flight_destinations.get(origin: 'MAD')
179
179
 
180
180
  # Flight Cheapest Date Search
181
- amadeus.shopping.flight_dates.get(origin: 'NYC', destination: 'MAD')
181
+ amadeus.shopping.flight_dates.get(origin: 'MAD', destination: 'MUC')
182
182
 
183
183
  # Flight Low-fare Search
184
184
  amadeus.shopping.flight_offers.get(origin: 'NYC', destination: 'MAD', departureDate: '2019-08-01')
@@ -227,6 +227,12 @@ amadeus.shopping.hotel_offers.get(cityCode: 'MAD')
227
227
  amadeus.shopping.hotel_offers_by_hotel.get(hotelId: 'IALONCHO')
228
228
  # Confirm the availability of a specific offer
229
229
  amadeus.shopping.hotel_offer('D5BEE9D0D08B6678C2F5FAD910DC110BCDA187D21D4FCE68ED423426D0A246BB').get
230
+
231
+ # Point of Interest
232
+ # What are the popular places in Barcelona (based a geo location and a radius)
233
+ amadeus.reference_data.locations.points_of_interest.get(latitude: 41.397158, longitude: 2.160873)
234
+ # What are the popular places in Barcelona? (based on a square)
235
+ amadeus.reference_data.locations.points_of_interest.by_square.get(north: 41.397158, west: 2.160873, south: 41.394582, east: 2.177181)
230
236
  ```
231
237
  ## Development & Contributing
232
238
 
@@ -18,6 +18,8 @@ require 'amadeus/namespaces/reference_data/urls/checkin_links'
18
18
  require 'amadeus/namespaces/reference_data/location'
19
19
  require 'amadeus/namespaces/reference_data/locations'
20
20
  require 'amadeus/namespaces/reference_data/locations/airports'
21
+ require 'amadeus/namespaces/reference_data/locations/points_of_interest'
22
+ require 'amadeus/namespaces/reference_data/locations/points_of_interest/by_square'
21
23
  require 'amadeus/namespaces/shopping/flight_destinations'
22
24
  require 'amadeus/namespaces/shopping/flight_offers'
23
25
  require 'amadeus/namespaces/shopping/flight_dates'
@@ -22,6 +22,16 @@ module Amadeus
22
22
  Amadeus::Namespaces::ReferenceData::Locations::Airports.new(client)
23
23
  end
24
24
 
25
+ # The namespace for the Point Of Interest API:
26
+ #
27
+ # @return [Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest]
28
+ # @example
29
+ # amadeus.reference_data.locations.points_of_interest
30
+ #
31
+ def points_of_interest
32
+ Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest.new(client)
33
+ end
34
+
25
35
  # Returns a list of airports and cities matching a given keyword.
26
36
  #
27
37
  # @option params [String] :keyword keyword that should represent the
@@ -5,7 +5,7 @@ module Amadeus
5
5
  class ReferenceData
6
6
  class Locations
7
7
  # A namespaced client for the
8
- # +/v2/reference-data/locations/airports+ endpoints
8
+ # +/v1/reference-data/locations/airports+ endpoints
9
9
  #
10
10
  # Access via the +Amadeus::Client+ object
11
11
  #
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Amadeus
4
+ module Namespaces
5
+ class ReferenceData
6
+ class Locations
7
+ # A namespaced client for the
8
+ # +/v1/reference-data/locations/pois+ endpoints
9
+ #
10
+ # Access via the +Amadeus::Client+ object
11
+ #
12
+ # amadeus = Amadeus::Client.new
13
+ # amadeus.reference_data.locations.points_of_interest
14
+ #
15
+ class PointsOfInterest < Amadeus::Client::Decorator
16
+ # The namespace for the Point Of Interest API:
17
+ #
18
+ # @return [Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest]
19
+ # @example
20
+ # amadeus.reference_data.locations.points_of_interest.by_square
21
+ #
22
+ def by_square
23
+ Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest::BySquare.new(client)
24
+ end
25
+
26
+ # Returns a list of relevant point of interests near to a given point.
27
+ #
28
+ # @option params [Double] :latitude latitude location to be at the
29
+ # center of the search circle - required
30
+ # @option params [Double] :longitude longitude location to be at the
31
+ # center of the search circle - required
32
+ # @return [Amadeus::Response] a parsed response
33
+ # @raise [Amadeus::Base] an exception if the call
34
+ # failed
35
+ # @example What are the popular places in Barcelona?
36
+ # amadeus.reference_data.locations.points_of_interest.get(
37
+ # latitude: 41.397158,
38
+ # longitude: 2.160873
39
+ # )
40
+ #
41
+ def get(params = {})
42
+ client.get('/v1/reference-data/locations/pois', params)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Amadeus
4
+ module Namespaces
5
+ class ReferenceData
6
+ class Locations
7
+ class PointsOfInterest
8
+ # A namespaced client for the
9
+ # +/v1/reference-data/locations/pois/by-square+ endpoints
10
+ #
11
+ # Access via the +Amadeus::Client+ object
12
+ #
13
+ # amadeus = Amadeus::Client.new
14
+ # amadeus.reference_data.locations.points_of_interest.by_square
15
+ #
16
+ class BySquare < Amadeus::Client::Decorator
17
+ # Returns a list of relevant point of interests
18
+ # around a defined square (4 points).
19
+ #
20
+ # @option params [Double] :north Latitude north of bounding box - required
21
+ # @option params [Double] :west Longitude west of bounding box - required
22
+ # @option params [Double] :south Latitude south of bounding box - required
23
+ # @option params [Double] :east Longitude east of bounding box - required
24
+ # @return [Amadeus::Response] a parsed response
25
+ # @raise [Amadeus::Base] an exception if the call
26
+ # failed
27
+ # @example What are the popular places in Barcelona?
28
+ # amadeus.reference_data.locations.points_of_interest.by_square.get(
29
+ # north: 41.397158,
30
+ # west: 2.160873,
31
+ # south: 41.394582,
32
+ # east: 2.177181
33
+ # )
34
+ #
35
+ def get(params = {})
36
+ client.get('/v1/reference-data/locations/pois/by-square', params)
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Amadeus
4
4
  # The current client version
5
- VERSION = '3.0.0'.freeze
5
+ VERSION = '3.1.0'.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: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amadeus
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-01-22 00:00:00.000000000 Z
13
+ date: 2019-04-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: awesome_print
@@ -216,6 +216,8 @@ files:
216
216
  - lib/amadeus/namespaces/reference_data/location.rb
217
217
  - lib/amadeus/namespaces/reference_data/locations.rb
218
218
  - lib/amadeus/namespaces/reference_data/locations/airports.rb
219
+ - lib/amadeus/namespaces/reference_data/locations/points_of_interest.rb
220
+ - lib/amadeus/namespaces/reference_data/locations/points_of_interest/by_square.rb
219
221
  - lib/amadeus/namespaces/reference_data/urls.rb
220
222
  - lib/amadeus/namespaces/reference_data/urls/checkin_links.rb
221
223
  - lib/amadeus/namespaces/shopping.rb
@@ -253,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
255
  - !ruby/object:Gem::Version
254
256
  version: '0'
255
257
  requirements: []
256
- rubygems_version: 3.0.2
258
+ rubygems_version: 3.0.3
257
259
  signing_key:
258
260
  specification_version: 4
259
261
  summary: Amadeus travel APIs