Class: Phoebe::Resources::Ref::Hotspot
- Inherits:
-
Object
- Object
- Phoebe::Resources::Ref::Hotspot
- 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
Instance Attribute Summary collapse
-
#geo ⇒ Phoebe::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.
-
#info ⇒ Phoebe::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.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Hotspot
constructor
private
A new instance of Hotspot.
-
#list(region_code, back: nil, fmt: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::HotspotListResponseItem>
Hotspots in a region.
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.
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
#geo ⇒ Phoebe::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 |
#info ⇒ Phoebe::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
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, = 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: ) end |