class Duststorm::WeatherApi::ForecastIo
Public Instance Methods
currently_response(response)
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 4 def currently_response(response) response[:currently] end
daily_response(response)
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 12 def daily_response(response) response[:daily][:data] end
high_temperature_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 24 def high_temperature_key :temperatureMax end
hourly_response(response)
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 8 def hourly_response(response) response[:hourly][:data] end
low_temperature_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 28 def low_temperature_key :temperatureMin end
precipitation_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 32 def precipitation_key :precipProbability end
sunrise_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 16 def sunrise_key :sunriseTime end
sunset_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 20 def sunset_key :sunsetTime end
wind_speed_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 36 def wind_speed_key :windSpeed end
Private Instance Methods
api_key()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 50 def api_key Duststorm.config[:forecast_io] end
forecast_path()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 46 def forecast_path "/forecast/#{api_key}/#{lat},#{lng}" end
root_url()
click to toggle source
# File lib/duststorm/weather_apis/forecast_io.rb, line 42 def root_url 'https://api.forecast.io' end