Class: Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest::BySquare

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/reference_data/locations/points_of_interest/by_square.rb

Overview

A namespaced client for the /v1/reference-data/locations/pois/by-square endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.reference_data.locations.points_of_interest.by_square

Instance Method Summary collapse

Instance Method Details

#get(params = {}) ⇒ Amadeus::Response

Returns a list of relevant point of interests

around a defined square (4 points).

Examples:

What are the popular places in Barcelona?

amadeus.reference_data.locations.points_of_interest.by_square.get(
  north: 41.397158,
  west: 2.160873,
  south: 41.394582,
  east: 2.177181
)

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :north (Double)

    Latitude north of bounding box - required

  • :west (Double)

    Longitude west of bounding box - required

  • :south (Double)

    Latitude south of bounding box - required

  • :east (Double)

    Longitude east of bounding box - required

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



35
36
37
# File 'lib/amadeus/namespaces/reference_data/locations/points_of_interest/by_square.rb', line 35

def get(params = {})
  client.get('/v1/reference-data/locations/pois/by-square', params)
end