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

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

Overview

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

Defined Under Namespace

Classes: Geo, Info

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Hotspot

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 Hotspot.

Parameters:



49
50
51
52
53
# File 'lib/phoebe/resources/ref/hotspot.rb', line 49

def initialize(client:)
  @client = client
  @geo = Phoebe::Resources::Ref::Hotspot::Geo.new(client: client)
  @info = Phoebe::Resources::Ref::Hotspot::Info.new(client: client)
end

Instance Attribute Details

#geoPhoebe::Resources::Ref::Hotspot::Geo (readonly)

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



12
13
14
# File 'lib/phoebe/resources/ref/hotspot.rb', line 12

def geo
  @geo
end

#infoPhoebe::Resources::Ref::Hotspot::Info (readonly)

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



17
18
19
# File 'lib/phoebe/resources/ref/hotspot.rb', line 17

def info
  @info
end

Instance Method Details

#list(region_code, back: nil, fmt: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::HotspotListResponseItem>

Hotspots in a region

Parameters:

Returns:

See Also:



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/phoebe/resources/ref/hotspot.rb', line 34

def list(region_code, params = {})
  parsed, options = Phoebe::Ref::HotspotListParams.dump_request(params)
  query = Phoebe::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["ref/hotspot/%1$s", region_code],
    query: query,
    model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::HotspotListResponseItem],
    options: options
  )
end