From fa8d894aff28c5c83d7f17ca496723badc9b6bac Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 11 Dec 2013 19:10:36 +0100 Subject: add stop, stop_id fields to ::Result --- lib/Travel/Status/DE/ASEAG.pm | 2 ++ lib/Travel/Status/DE/ASEAG/Result.pm | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/ASEAG.pm b/lib/Travel/Status/DE/ASEAG.pm index 3477231..ccdf5fa 100644 --- a/lib/Travel/Status/DE/ASEAG.pm +++ b/lib/Travel/Status/DE/ASEAG.pm @@ -176,6 +176,8 @@ sub results { countdown_sec => $dt_dep->subtract_datetime($dt_now)->in_units('seconds'), route_timetable => [@route], + stop => $stopname, + stop_id => $stopid, ) ); } diff --git a/lib/Travel/Status/DE/ASEAG/Result.pm b/lib/Travel/Status/DE/ASEAG/Result.pm index 47d9d0c..6e09692 100644 --- a/lib/Travel/Status/DE/ASEAG/Result.pm +++ b/lib/Travel/Status/DE/ASEAG/Result.pm @@ -10,7 +10,7 @@ our $VERSION = '0.00'; Travel::Status::DE::ASEAG::Result->mk_ro_accessors( qw(countdown countdown_sec date datetime destination line line_id - route_timetable time) + route_timetable stop stop_id time) ); sub new { @@ -92,6 +92,19 @@ The name of the line. The number of the line. +=item $departure->route_timetable + +Returns an arrayref of arrayrefs describing the entire route as departure, +stop objects. + +=item $departure->stop + +The stop belonging to this departure. + +=item $departure->stop_id + +The stop ID belonging to this departure. + =item $departure->time Departure time (HH:MM:SS). -- cgit v1.2.3