summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index fba55cd..796afc5 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -16,7 +16,7 @@ Travel::Status::DE::HAFAS::Journey->mk_ro_accessors(
qw(datetime sched_datetime rt_datetime
is_cancelled is_partially_cancelled
platform sched_platform rt_platform operator
- id name type type_long number line load delay
+ id name type type_long class number line load delay
route_end route_start origin destination direction)
);
@@ -86,6 +86,8 @@ sub new {
}
}
+ my $class = $product->{cls};
+
my @stops;
for my $stop ( @{ $journey->{stopL} // [] } ) {
my $loc = $locL[ $stop->{locX} ];
@@ -169,6 +171,7 @@ sub new {
line => $line_no,
type => $cat,
type_long => $catlong,
+ class => $class,
operator => $operator,
direction => $direction,
is_cancelled => $is_cancelled,
@@ -379,6 +382,12 @@ or "STR" for tram / StraE<szlig>enbahn.
Returns the long type of this journey, e.g. "S-Bahn" or "Regional-Express".
+=item $journey->class
+
+Returns an integer identifying the the mode of transport class.
+Semantics depend on backend, e.g. "1" and "2" for long-distance trains and
+"4" and "8" for region trains.
+
=item $journey->line
Returns the line identifier, or undef if it is unknown.