View Source ExWeatherkit (ExWeatherkit v0.1.2)

ExWeatherkit is an Apple WeatherKit REST API client for Elixir

Summary

Functions

Get current weather for a latitude and longitude

Get daily forecast for a latitude and longitude

Get hourly forecast for a latitude and longitude

Get next hour forecast for a latitude and longitude

Functions

Link to this function

current_weather(lat, lng, lang \\ "en", tz \\ "GMT/UTC")

View Source

Get current weather for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts

Example:

iex> ExWeatherkit.current_weather(39.183608, -96.571669)
Link to this function

forecast_daily(lat, lng, lang \\ "en", tz \\ "GMT/UTC")

View Source

Get daily forecast for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts

Example:

iex> ExWeatherkit.forecast_daily(39.183608, -96.571669)
Link to this function

forecast_hourly(lat, lng, lang \\ "en", tz \\ "GMT/UTC")

View Source

Get hourly forecast for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts

Example:

iex> ExWeatherkit.forecast_hourly(39.183608, -96.571669)
Link to this function

forecast_next_hour(lat, lng, lang \\ "en", tz \\ "GMT/UTC")

View Source

Get next hour forecast for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts

Example:

iex> ExWeatherkit.forecast_next_hour(39.183608, -96.571669)
Link to this function

weather_alerts(lat, lng, lang \\ "en", tz \\ "GMT/UTC", country_code \\ "US")

View Source

Get weather alerts for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts
  • country_code: The ISO Alpha-2 country code for the requested location

Example:

iex> ExWeatherkit.weather_alerts(39.183608, -96.571669)
Link to this function

weather_multi(lat, lng, data_sets \\ ["currentWeather"], lang \\ "en", tz \\ "GMT/UTC", country_code \\ "US")

View Source

Get multiple weather data sets for a latitude and longitude

Parameters

  • lat: The latitude of the desired location
  • lng: The longitude of the desired location
  • lang: The language tag to use for localizing responses
  • tz: The name of the timezone to use for rolling up weather forecasts into daily forecasts
  • data_sets: A list of data sets to include in the response, possible values: currentWeather, forecastDaily, forecastHourly, forecastNextHour, weatherAlerts
  • country_code: The ISO Alpha-2 country code of the requested location

Example:

iex> ExWeatherkit.weather_multi(39.183608, -96.571669, ["currentWeather", "forecastDaily"])