Class: Amadeus::Namespaces::Safety::SafetyRatedLocations::BySquare

Inherits:
Client::Decorator
  • Object
show all
Defined in:
lib/amadeus/namespaces/safety/safety_rated_locations/by_square.rb

Overview

A namespaced client for the /v1/safety/safety_rated_locations/by-square endpoints

Access via the Amadeus::Client object

amadeus = Amadeus::Client.new
amadeus.safety.safety_rated_locations.by_square

Instance Method Summary collapse

Instance Method Details

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

Returns a list of relevant safety information

around a defined square (4 points).

Examples:

How safe is Barcelona?

amadeus.safety.safety_rated_locations.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



34
35
36
# File 'lib/amadeus/namespaces/safety/safety_rated_locations/by_square.rb', line 34

def get(params = {})
  client.get('/v1/safety/safety-rated-locations/by-square', params)
end