CitraClient.Schemas.WeatherAlert (citra_client v0.3.0)

View Source

Weather alert data

Fields

  • :descriptionString.t() — Description of the alert
  • :endinteger() — Date and time of the end of the alert, Unix, UTC
  • :eventString.t() — Alert event name
  • :sender_nameString.t() (API key: senderName) — Name of the alert source
  • :startinteger() — Date and time of the start of the alert, Unix, UTC
  • :tags — list of String.t() — Type of severe weather

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.WeatherAlert{
  description: String.t() | nil,
  end: integer() | nil,
  event: String.t() | nil,
  sender_name: String.t() | nil,
  start: integer() | nil,
  tags: [String.t() | 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.