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

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

Overview

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

Access via the Amadeus::Client object

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

Defined Under Namespace

Classes: BySquare

Instance Method Summary collapse

Instance Method Details

#by_squareAmadeus::Namespaces::ReferenceData::Locations::PointsOfInterest

The namespace for the Point Of Interest API:

Examples:

amadeus.reference_data.locations.points_of_interest.by_square

Returns:



22
23
24
# File 'lib/amadeus/namespaces/reference_data/locations/points_of_interest.rb', line 22

def by_square
  Amadeus::Namespaces::ReferenceData::Locations::PointsOfInterest::BySquare.new(client)
end

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

Returns a list of relevant point of interests near to a given point.

Examples:

What are the popular places in Barcelona?

amadeus.reference_data.locations.points_of_interest.get(
  latitude: 41.397158,
  longitude: 2.160873
)

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :latitude (Double)

    latitude location to be at the center of the search circle - required

  • :longitude (Double)

    longitude location to be at the center of the search circle - required

Returns:

Raises:

  • (Amadeus::Base)

    an exception if the call failed



41
42
43
# File 'lib/amadeus/namespaces/reference_data/locations/points_of_interest.rb', line 41

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