ExOwm v1.0.0-rc.1 ExOwm View Source

ExOwm, OpenWeatherMap API Elixir client. This module contains main public interface of the application.

Link to this section Summary

Types

Current weather data API call options corresponding to OWM APIs described in official docs: http://openweathermap.org/api

Keyword list of options

Current weather data API request

Current weather data API requests

Functions

Gets weather data of the given location with specified options

Gets 5 day forecast data of the given location with specified options

Gets 1 to 16 days forecast data of the given location with specified options

Link to this section Types

Link to this type option() View Source
option() :: :format | :units | :lang | :cnt | :like | :accurate | :mode | :cnt

Current weather data API call options corresponding to OWM APIs described in official docs: http://openweathermap.org/api

The output of the request can be specified according to below options.

Link to this type options() View Source
options() :: [{:option, term()}]

Keyword list of options.

Link to this type request() View Source
request() ::
  %{city: String.t()}
  | %{city: String.t(), country_code: String.t()}
  | %{id: integer()}
  | %{lat: float(), lon: float()}
  | %{zip: String.t(), country_code: String.t()}

Current weather data API request.

Link to this type requests() View Source
requests() :: [request()]

Current weather data API requests.

Link to this section Functions

Link to this function get_current_weather(locations, opts \\ []) View Source
get_current_weather(requests(), options()) :: map()

Gets weather data of the given location with specified options.

Examples

iex> ExOwm.get_current_weather([%{city: "Warsaw"}, %{city: "London", country_code: "uk"}], units: :metric, lang: :pl)
Link to this function get_five_day_forecast(locations, opts \\ []) View Source
get_five_day_forecast(requests(), options()) :: map()

Gets 5 day forecast data of the given location with specified options.

Examples

iex> ExOwm.get_five_day_forecast([%{city: "Warsaw"}, %{city: "London", country_code: "uk"}], units: :metric, lang: :pl)
Link to this function get_sixteen_day_forecast(locations, opts \\ []) View Source
get_sixteen_day_forecast(requests(), options()) :: map()

Gets 1 to 16 days forecast data of the given location with specified options.

Examples

iex> ExOwm.get_sixteen_day_forecast([%{city: "Warsaw"}, %{city: "London", country_code: "uk"}], units: :metric, lang: :pl, cnt: 16)