Forecastr Build StatusPackage VersionLicense

Forecastr is an open source Weather API wrapper for OpenWeatherMap and DarkSky API.

Forecastr is an Elixir flavour of http://wttr.in that talks directly to one of the aforementioned weather services. Aim of the project is to provide a website similar to wttr.in written entirely in elixir

Project status: initial. (very alphaish)

Installation

If available in Hex, the package can be installed by adding forecastr to your list of dependencies in mix.exs:

def deps do
  [
    {:forecastr, "~> 0.2"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/forecastr.

NOTE If you want to play with this project you have to obtain an api key from http://openweathermap.org/ or https://darksky.net/f and:

export FORECASTR_API_KEY=YOUR_API_KEY

Also put in your config/config.exs

config :forecastr,
  appid: System.get_env("FORECASTR_API_KEY"),
  backend: Forecastr.OWM,
  # 10 minutes by default
  ttl: 10 * 60_000

If you want to use the DarkSky API put backend: Forecastr.Darksky

Samples of output for today's forecast:

Forecastr.forecast(:today, "lima")

todayberlin

Sample output with the OWM backend (the number of days is different depending on the backend used):

Forecastr.forecast(:today, "lima")

in 5 days

"All the ducks are swimming in the water Fal de ral de ral do" (Lemon Jelly cit.)

duck with sunglasses

TODO

Thank yous