This handler will allow Alice to provide the weather forecast of a given location. Powered by Dark Sky
If available in Hex, the package can be installed as:
- Add
alice_weather
to your list of dependencies inmix.exs
:
def deps do
[
{:alice_weather, "~> 0.1.0"}
]
end
-
Add the handler to your list of registered handlers in
mix.exs
:def application do [applications: [:alice], mod: { Alice, [Alice.Handlers.Weather, ...]}] end
-
Set up the API keys and Geocodex
geocode_api_url
in your app'sconfig.exs
:config :my_bot, api_key: System.get_env("DARKSKY_API_KEY") config :geocodex, api_key: System.get_env("GOOGLE_GEOCODING_API_KEY") config :geocodex, geocode_api_url: "https://maps.googleapis.com/maps/api/geocode"
Use @alice help
for more information.