Class: Barometer::Query::Service::GeonamesTimezone::Api
- Inherits:
-
Utils::Api
- Object
- Utils::Api
- Barometer::Query::Service::GeonamesTimezone::Api
- Defined in:
- lib/barometer/query/services/apis/geonames_timezone.rb
Instance Attribute Summary
Attributes inherited from Utils::Api
Instance Method Summary collapse
-
#initialize(latitude, longitude) ⇒ Api
constructor
A new instance of Api.
- #params ⇒ Object
- #unwrap_nodes ⇒ Object
- #url ⇒ Object
Methods inherited from Utils::Api
Constructor Details
#initialize(latitude, longitude) ⇒ Api
Returns a new instance of Api.
6 7 8 9 |
# File 'lib/barometer/query/services/apis/geonames_timezone.rb', line 6 def initialize(latitude, longitude) @latitude = latitude @longitude = longitude end |
Instance Method Details
#params ⇒ Object
15 16 17 |
# File 'lib/barometer/query/services/apis/geonames_timezone.rb', line 15 def params { lat: @latitude, lng: @longitude } end |
#unwrap_nodes ⇒ Object
19 20 21 |
# File 'lib/barometer/query/services/apis/geonames_timezone.rb', line 19 def unwrap_nodes ['geonames', 'timezone'] end |
#url ⇒ Object
11 12 13 |
# File 'lib/barometer/query/services/apis/geonames_timezone.rb', line 11 def url 'http://ws.geonames.org/timezone' end |