Sha256: 4f82636a2da292cdcb5a802fd948217b0cf651f8cb594ae594f60edc7d89ab06

Contents?: true

Size: 459 Bytes

Versions: 6

Compression:

Stored size: 459 Bytes

Contents

require_relative 'current_query'

module Barometer
  module WeatherService
    class Noaa
      class CurrentApi < Utils::Api
        def initialize(query)
          @query = CurrentQuery.new(query)
        end

        def url
          "http://w1.weather.gov/xml/current_obs/#{@query.to_param}.xml"
        end

        def params
          nil
        end

        def unwrap_nodes
          ['current_observation']
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
barometer-0.9.5 lib/barometer/weather_services/noaa/current_api.rb
barometer-0.9.4 lib/barometer/weather_services/noaa/current_api.rb
barometer-0.9.3 lib/barometer/weather_services/noaa/current_api.rb
barometer-0.9.2 lib/barometer/weather_services/noaa/current_api.rb
barometer-0.9.1 lib/barometer/weather_services/noaa/current_api.rb
barometer-0.9.0 lib/barometer/weather_services/noaa/current_api.rb