CitraClient.Schemas.CurrentWeather (citra_client v0.3.0)

View Source

Current weather data

Fields

  • :cloudsinteger() — Cloudiness, %
  • :dew_pointnumber() (API key: dewPoint) — Atmospheric temperature below which water droplets begin to condense
  • :dtinteger() — Current time, Unix, UTC
  • :feels_likenumber() (API key: feelsLike) — Temperature. This temperature parameter accounts for the human perception of weather
  • :humidityinteger() — Humidity, %
  • :pressureinteger() — Atmospheric pressure on the sea level, hPa
  • :sunriseinteger() — Sunrise time, Unix, UTC
  • :sunsetinteger() — Sunset time, Unix, UTC
  • :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.CurrentWeather{
  clouds: integer() | nil,
  dew_point: number() | nil,
  dt: integer() | nil,
  feels_like: number() | nil,
  humidity: integer() | nil,
  pressure: integer() | nil,
  sunrise: integer() | nil,
  sunset: integer() | 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.