Sha256: f1f69c5d7123fdd48fb86332ea6860e715d0cc74a7af1a25abfd3a3840ba0540

Contents?: true

Size: 419 Bytes

Versions: 8

Compression:

Stored size: 419 Bytes

Contents

require_relative 'apis/wunderground_timezone'

module Barometer
  module Query
    module Service
      class WundergroundTimezone
        def self.fetch(latitude, longitude)
          return unless latitude && longitude

          api = WundergroundTimezone::Api.new(latitude, longitude)
          payload = api.get

          Data::Zone.new( payload.fetch('date', 'tz_long') )
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.6 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.5 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.4 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.3 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.2 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.1 lib/barometer/query/services/wunderground_timezone.rb
barometer-0.9.0 lib/barometer/query/services/wunderground_timezone.rb