Skip to content

DTO: Alert details

Morten Rugaard edited this page Sep 4, 2022 · 3 revisions

Home / DTO / Alert details

Forecasts Measurements Miscellaneous
Alert Cloud cover Area
Alert details Direction Coordinate
Day Humidity Message
Hour Precipitation Moon
Minute Pressure Provider
Period Temperature Source
Visibility Sun times
Wind Time period

Alert details

Contains more detailed information and a summary about a specific weather alert.

Available data

Helpers

Alert period

The period where weather alert goes into effect and when it expires.

getAlertPeriod(): \Rugaard\WeatherKit\DTO\TimePeriod

Returns an object of type Rugaard\WeatherKit\DTO\TimePeriod.

Area

The geographic region the weather alert applies to.

getArea(): \Rugaard\WeatherKit\DTO\Area

Returns an object of type Rugaard\WeatherKit\DTO\Area.

Area ID

The official designation of the affected area.

getAreaId(): string

Returns a string.

Area name

A human-readable name of the affected area.

getAreaName(): string

Returns a string.

Certainty

How likely the event is to occur.

getCertainty(): \Rugaard\WeatherKit\Enums\Certainty

Returns an enum of type Rugaard\WeatherKit\Enums\Certainty.

Country code

The ISO 3166-1 alpha-2 country code of the reporting country.

getCountryCode(): string

Returns a string.

Description

A human-readable description of the event.

getDescription(): string

Returns a string.

Embed URL

A URL to a page containing detailed information about the event.

getEmbedUrl(): string

Returns a string.

Event period

The period where the underlying weather event is projected to start and end.

getEventPeriod(): \Rugaard\WeatherKit\DTO\TimePeriod

Returns an object of type Rugaard\WeatherKit\DTO\TimePeriod.

ID

A unique identifier (UUID) of the event.

getId(): string

Returns a string.

Importance

Importance level of the event.

getImportance(): \Rugaard\WeatherKit\Enums\Importance

Returns an enum of type Rugaard\WeatherKit\Enums\Importance.

Issued timestamp

The time the event was issued by the reporting agency.

getIssuedTime(): DateTime

Returns a DateTime object.

Messages

A Collection of official text messages describing the event from the agency.

getMessages(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection, where each key returns an object of type Rugaard\WeatherKit\DTO\Message.

Precedence

Whether there is precedence for the event or not.

getPrecedence(): string

Returns a boolean.

Recommended actions

An array of recommended actions from the reporting agency.

getRecommendedActions(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection, where each key returns an enum of type Rugaard\WeatherKit\Enums\Action.

Severity

The level of danger to life and property

getSeverity(): \Rugaard\WeatherKit\Enums\Severity

Returns an enum of type Rugaard\WeatherKit\Enums\Severity.

Source

The name of the reporting agency.

getSource(): string

Returns a string.

Urgency

An indication of urgency of action from the reporting agency.

getSeverity(): \Rugaard\WeatherKit\Enums\Urgency

Returns an enum of type Rugaard\WeatherKit\Enums\Urgency.

To Array

Convert the entire DTO to an array.

toArray(): array 

Returns an array.

Clone this wiki locally