CitraClient.Schemas.HourlyForecast (citra_client v0.3.0)

View Source

Hourly forecast data

Fields

  • :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_likenumber() (API key: feelsLike) — Temperature. This temperature parameter accounts for the human perception of weather
  • :humidityinteger() — Humidity, %
  • :popnumber() — Probability of precipitation
  • :pressureinteger() — Atmospheric pressure on the sea level, hPa
  • :sun_azimuthnumber() (API key: sunAzimuth) — Sun azimuth in degrees (0-360)
  • :sun_elevationnumber() (API key: sunElevation) — Sun elevation in degrees (-90 to 90)
  • :tempnumber() — Temperature
  • :uvinumber() — UV index
  • :visibilityinteger() — Average visibility, metres
  • :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.HourlyForecast{
  clouds: integer() | nil,
  dew_point: number() | nil,
  dt: integer() | nil,
  feels_like: number() | nil,
  humidity: integer() | nil,
  pop: number() | nil,
  pressure: integer() | nil,
  sun_azimuth: number() | nil,
  sun_elevation: number() | nil,
  temp: number() | nil,
  uvi: number() | nil,
  visibility: integer() | 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.