View Source ExOwm.CurrentWeather.Worker (ExOwm v1.3.1)

Current Weather Worker task implementation.

Summary

Functions

Returns current weather for a specific location and given options. Checks whether request has been already cached, if not it sends the request to OWM API and caches it with specific TTL.

Functions

Link to this function

get_current_weather(location, opts)

View Source
@spec get_current_weather(map(), [{:key, atom()}]) ::
  {:ok, map()} | {:error, map()} | {:error, map(), map()}

Returns current weather for a specific location and given options. Checks whether request has been already cached, if not it sends the request to OWM API and caches it with specific TTL.