NAME

Travel::Status::DE::EFA::Stop - Information about a stop (station) contained in a Travel::Status::DE::EFA::Result's route

SYNOPSIS

for my $stop ($departure->route_post) {
    printf(
        "%s -> %s : %40s %s\n",
        $stop->arr ? $stop->arr->strftime('%H:%M') : q{--:--},
        $stop->dep ? $stop->dep->strftime('%H:%M') : q{--:--},
        $stop->name, $stop->platform
    );
}

VERSION

version 3.03

DESCRIPTION

Travel::Status::DE::EFA::Stop describes a single stop of a departure's route. It is solely based on the respective departure's schedule; delays or changed platforms are not taken into account.

METHODS

ACCESSORS

Most accessors return undef if the corresponding data is not available.

$stop->sched_arr

DateTime(3pm) object holding scheduled arrival date and time.

$stop->rt_arr

DateTime(3pm) object holding estimated (real-time) arrival date and time.

$stop->arr

DateTime(3pm) object holding arrival date and time. Real-time data if available, schedule data otherwise.

$stop->arr_delay

Arrival delay in minutes.

$stop->sched_dep

DateTime(3pm) object holding scheduled departure date and time.

$stop->rt_dep

DateTime(3pm) object holding estimated (real-time) departure date and time.

$stop->dep

DateTime(3pm) object holding departure date and time. Real-time data if available, schedule data otherwise.

$stop->dep_delay

Departure delay in minutes.

$stop->delay

Delay in minutes. Departure delya if available, arrival delay otherwise.

$stop->distance_m

Distance from request coordinates in meters. undef if the object has not been obtained by means of a coord request.

$stop->id

Stop ID.

$stop->stop_id

The other kind of stop ID. Yes, EFA has two.

$stop->place

Place or city name, for instance "Essen".

$stop->full_name

stop name with place or city prefix ("City Stop", for instance "Essen Rüttenscheider Stern").

$stop->name

stop name without place or city prefix, for instance "Rüttenscheider Stern".

$stop->latlon

Arrayref describing the stop's latitude and longitude in WGS84 coordinates.

$stop->platform

Platform name/number if available, empty string otherwise.

INTERNAL

$stop = Travel::Status::DE::EFA::Stop->new(%data)

Returns a new Travel::Status::DE::EFA::Stop object. You should not need to call this.

$stop->TO_JSON

Allows the object data to be serialized to JSON.

DIAGNOSTICS

None.

DEPENDENCIES

Class::Accessor(3pm)

BUGS AND LIMITATIONS

This module is a Work in Progress. Its API may change between minor versions.

SEE ALSO

Travel::Status::DE::EFA(3pm).

AUTHOR

Copyright (C) 2015-2023 by Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This module is licensed under the same terms as Perl itself.