Class: Barometer::Query::Service::GeonamesTimezone
- Inherits:
-
Object
- Object
- Barometer::Query::Service::GeonamesTimezone
- Defined in:
- lib/barometer/query/services/geonames_timezone.rb,
lib/barometer/query/services/apis/geonames_timezone.rb
Defined Under Namespace
Classes: Api
Class Method Summary collapse
Class Method Details
.fetch(latitude, longitude) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/barometer/query/services/geonames_timezone.rb', line 7 def self.fetch(latitude, longitude) return unless latitude && longitude api = GeonamesTimezone::Api.new(latitude, longitude) payload = api.get Data::Zone.new( payload.fetch('timezoneId') ) end |