struct TCal::V3API::Alert::Attributes

Overview

The attributes of an Alert resource.

The active_period and informed_entity attributes are remapped to align with the convention that collections have plural names.

Included Modules

Defined in:

t_cal/v3_api/alert.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def active_periods : Array(ActivePeriod) #

[View source]
def created_at : Time #

[View source]
def definite_active_periods : Array(TimePeriod) #

Returns the #active_periods that are valid and have defined end times.


[View source]
def description : String | Nil #

Normalize DOS-style line breaks found in descriptions.


[View source]
def header : String #

[View source]
def image : String | Nil #

[View source]
def image_alternative_text : String | Nil #

[View source]
def informed_entities : Array(InformedEntity) #

[View source]
def service_effect : String #

[View source]
def transient? : Bool #

Tries to guess whether this alert is "transient" (represents an unplanned disruption that is not expected to last very long).

An alert is transient if it has only one active period, with a start time within 1 hour of the alert's creation timestamp, a definite end time, and a duration of less than 12 hours. These are indicators that the alert was likely created in response to a short-term unplanned disruption which was already happening at the time of creation.


[View source]
def updated_at : Time #

[View source]
def url : String | Nil #

[View source]