CitraClient.Schemas.DailyForecast (citra_client v0.3.0)

View Source

Daily forecast data

Fields

  • :astronomical_twilight_begininteger() (API key: astronomicalTwilightBegin) — Astronomical dusk (sun at -18°), Unix, UTC
  • :astronomical_twilight_endinteger() (API key: astronomicalTwilightEnd) — Astronomical dawn (sun at -18°), Unix, UTC
  • :cloudsinteger() — Cloudiness, %
  • :dew_pointnumber() (API key: dewPoint) — Atmospheric temperature below which water droplets begin to condense
  • :dtinteger() — Time of the forecasted data, unix, UTC
  • :feels_likeCitraClient.Schemas.DailyFeelsLike.t() (API key: feelsLike) — Daily feels like temperature
  • :humidityinteger() — Humidity, %
  • :moon_phasenumber() (API key: moonPhase) — Moon phase
  • :moonriseinteger() — Moonrise time, Unix, UTC
  • :moonsetinteger() — Moonset time, Unix, UTC
  • :popnumber() — Probability of precipitation
  • :pressureinteger() — Atmospheric pressure on the sea level, hPa
  • :rainnumber() — Precipitation volume, mm
  • :snownumber() — Snow volume, mm
  • :sunriseinteger() — Sunrise time, Unix, UTC
  • :sunsetinteger() — Sunset time, Unix, UTC
  • :tempCitraClient.Schemas.DailyTemperature.t() — Daily temperature
  • :uvinumber() — The maximum value of UV index for the day
  • :weather — list of CitraClient.Schemas.WeatherCondition.t() — Weather conditions
  • :wind_deginteger() (API key: windDeg) — Wind direction, degrees
  • :wind_gustnumber() (API key: windGust) — Wind gust
  • :wind_speednumber() (API key: windSpeed) — Wind speed

Summary

Functions

Build this struct from a decoded JSON map received from the API. Unknown fields are ignored.

Convert this struct into a map with the API's camelCase keys, ready to be JSON-encoded. Fields whose value is nil are omitted.

Types

t()

@type t() :: %CitraClient.Schemas.DailyForecast{
  astronomical_twilight_begin: integer() | nil,
  astronomical_twilight_end: integer() | nil,
  clouds: integer() | nil,
  dew_point: number() | nil,
  dt: integer() | nil,
  feels_like: CitraClient.Schemas.DailyFeelsLike.t() | map() | nil,
  humidity: integer() | nil,
  moon_phase: number() | nil,
  moonrise: integer() | nil,
  moonset: integer() | nil,
  pop: number() | nil,
  pressure: integer() | nil,
  rain: number() | nil,
  snow: number() | nil,
  sunrise: integer() | nil,
  sunset: integer() | nil,
  temp: CitraClient.Schemas.DailyTemperature.t() | map() | nil,
  uvi: number() | nil,
  weather: [CitraClient.Schemas.WeatherCondition.t() | map() | nil],
  wind_deg: integer() | nil,
  wind_gust: number() | nil,
  wind_speed: number() | nil
}

Functions

from_api(data)

Build this struct from a decoded JSON map received from the API. Unknown fields are ignored.

to_api(struct)

Convert this struct into a map with the API's camelCase keys, ready to be JSON-encoded. Fields whose value is nil are omitted.