kamilsss655 / elixir-metex

Example weather application from The Little Elixir OTP Guide book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metex

Simple weather application from the The Little Elixir OTP Guidebook.

Part of my Elixir study.

Example usage:

iex -S mix
iex(5)> cities = ["Chicago", "Toronto", "Vancouver"]
["Chicago", "Toronto", "Vancouver"]
iex(6)> Metex.temperatures_of(cities)
:ok
Chicago: -6.5°C, Toronto: -5.0°C, Vancouver: 0.1°C
iex(7)> flush
:ok

Config

You need to create file config/secrets.exs with openweathermap API key as follows:

use Mix.Config
config :metex, API_KEY: "XXXX"

Installation

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

def deps do
  [
    {:metex, "~> 0.1.0"}
  ]
end

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

About

Example weather application from The Little Elixir OTP Guide book


Languages

Language:Elixir 100.0%