Class: Lita::Handlers::Forecast
Overview
Lita Forecast.io plugin! this provides handlers for US and Canadian units
Class Method Summary
collapse
Instance Method Summary
collapse
#weather, #weather_forecast
#geo_location, #units
Class Method Details
.default_config(config) ⇒ Object
14
15
16
|
# File 'lib/lita/handlers/forecast.rb', line 14
def self.default_config(config)
config.api_key = nil
end
|
Instance Method Details
#build_weather(units, response) ⇒ Object
44
45
46
|
# File 'lib/lita/handlers/forecast.rb', line 44
def build_weather(units, response)
weather(response, api_key, units)
end
|
#weather_ca(response) ⇒ Object
40
41
42
|
# File 'lib/lita/handlers/forecast.rb', line 40
def weather_ca(response)
response.reply(build_weather('ca', response))
end
|
#weather_us(response) ⇒ Object
36
37
38
|
# File 'lib/lita/handlers/forecast.rb', line 36
def weather_us(response)
response.reply(build_weather('us', response))
end
|