Class: Phoebe::Resources::Ref::Hotspot::Geo

Inherits:
Object
  • Object
show all
Defined in:
lib/phoebe/resources/ref/hotspot/geo.rb

Overview

With the ref/hotspot end-points you can find the hotspots for a given country or region or nearby hotspots

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Geo

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Geo.

Parameters:



45
46
47
# File 'lib/phoebe/resources/ref/hotspot/geo.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(lat:, lng:, back: nil, dist: nil, fmt: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Hotspot::GeoRetrieveResponseItem>

Get the list of hotspots, within a radius of up to 50 kilometers, from a given set of coordinates.

Parameters:

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/phoebe/resources/ref/hotspot/geo.rb', line 30

def retrieve(params)
  parsed, options = Phoebe::Ref::Hotspot::GeoRetrieveParams.dump_request(params)
  query = Phoebe::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "ref/hotspot/geo",
    query: query,
    model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::Hotspot::GeoRetrieveResponseItem],
    options: options
  )
end