Class: Barometer::WeatherService::WundergroundV1::ForecastApi

Inherits:
Utils::Api
  • Object
show all
Defined in:
lib/barometer/weather_services/wunderground_v1/forecast_api.rb

Instance Attribute Summary

Attributes inherited from Utils::Api

#query

Instance Method Summary collapse

Methods inherited from Utils::Api

#current_query, #get, #params

Constructor Details

#initialize(query) ⇒ ForecastApi

Returns a new instance of ForecastApi



7
8
9
# File 'lib/barometer/weather_services/wunderground_v1/forecast_api.rb', line 7

def initialize(query)
  @query = WundergroundV1::Query.new(query)
end

Instance Method Details

#unwrap_nodesObject



15
16
17
# File 'lib/barometer/weather_services/wunderground_v1/forecast_api.rb', line 15

def unwrap_nodes
  ['forecast']
end

#urlObject



11
12
13
# File 'lib/barometer/weather_services/wunderground_v1/forecast_api.rb', line 11

def url
  'http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml'
end