View Source Weather.API (Weather v0.3.3)

Fetches weather data from the OpenWeatherMap API.

Summary

Functions

Fetches location data (latitude, longitude, name, country) given a zip code.

Fetches weather data from the OpenWeatherMap API.

Functions

Link to this function

fetch_location(map, appid)

View Source
@spec fetch_location(%{zip: String.t()}, String.t()) ::
  {:ok, Req.Response.t()} | {:error, Exception.t()}

Fetches location data (latitude, longitude, name, country) given a zip code.

Link to this function

fetch_weather(opts \\ Weather.Opts.new())

View Source
@spec fetch_weather(Weather.Opts.t()) ::
  {:ok, Req.Response.t()} | {:error, Exception.t()}

Fetches weather data from the OpenWeatherMap API.