Class: Duststorm::WeatherApi::ForecastIo

Inherits:
Base
  • Object
show all
Defined in:
lib/duststorm/weather_apis/forecast_io.rb

Instance Attribute Summary

Attributes inherited from Base

#lat, #lng, #options

Instance Method Summary collapse

Methods inherited from Base

#conn, #execute, #forecast_url, #initialize, #response

Methods included from Utils::ResponseMapper

#mapped_response_body, #summary_key, #temperature_key, #time_key

Constructor Details

This class inherits a constructor from Duststorm::WeatherApi::Base

Instance Method Details

#currently_response(response) ⇒ Object



4
5
6
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 4

def currently_response(response)
  response[:currently]
end

#daily_response(response) ⇒ Object



12
13
14
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 12

def daily_response(response)
  response[:daily][:data]
end

#high_temperature_keyObject



24
25
26
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 24

def high_temperature_key
  :temperatureMax
end

#hourly_response(response) ⇒ Object



8
9
10
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 8

def hourly_response(response)
  response[:hourly][:data]
end

#low_temperature_keyObject



28
29
30
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 28

def low_temperature_key
  :temperatureMin
end

#precipitation_keyObject



32
33
34
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 32

def precipitation_key
  :precipProbability
end

#sunrise_keyObject



16
17
18
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 16

def sunrise_key
  :sunriseTime
end

#sunset_keyObject



20
21
22
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 20

def sunset_key
  :sunsetTime
end

#wind_speed_keyObject



36
37
38
# File 'lib/duststorm/weather_apis/forecast_io.rb', line 36

def wind_speed_key
  :windSpeed
end