NAME
Travel::Status::DE::URA::Result - Information about a single departure received by Travel::Status::DE::URA
SYNOPSIS
for my $departure ($status->results) {
printf(
"At %s: %s to %s (in %d minutes)",
$departure->time, $departure->line, $departure->destination,
$departure->countdown
);
}
VERSION
version 0.02
DESCRIPTION
Travel::Status::DE::URA::Result describes a single departure as obtained by Travel::Status::DE::URA. It contains information about the time, line number and destination.
METHODS
ACCESSORS
- $departure->countdown
-
Time in minutes from the time Travel::Status::DE::URA was instantiated until the bus will depart.
- $departure->countdown_sec
-
Time in seconds from the time Travel::Status::DE::URA was instantiated until the bus will depart.
- $departure->date
-
Departure date (DD.MM.YYYY)
- $departure->datetime
-
DateTime object holding the departure date and time.
- $departure->destination
-
Destination name.
- $departure->line
-
The name of the line.
- $departure->line_id
-
The number of the line.
- $departure->route_timetable
-
If the results method of Travel::Status::DE::URA(3pm) was called with full_routes => true: Returns a list of arrayrefs describing the entire route. I.e.
[[$time1, $stop1], [$time2, $stop2], ...]
. The times are DateTime::Duration(3pm) objects, the stops are only names, not IDs (subject to change). Returns an empty list otherwise. - $departure->stop
-
The stop belonging to this departure.
- $departure->stop_id
-
The stop ID belonging to this departure.
- $departure->time
-
Departure time (HH:MM:SS).
INTERNAL
- $departure = Travel::Status::DE::URA::Result->new(%data)
-
Returns a new Travel::Status::DE::URA::Result object. You should not need to call this.
- $departure->TO_JSON
-
Allows the object data to be serialized to JSON.
DIAGNOSTICS
None.
DEPENDENCIES
BUGS AND LIMITATIONS
Unknown.
SEE ALSO
Travel::Status::DE::URA(3pm).
AUTHOR
Copyright (C) 2013 by Daniel Friesel <derf@finalrewind.org>
LICENSE
This module is licensed under the same terms as Perl itself.