summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-10 21:56:26 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-10 21:56:26 +0100
commit57c364c44bc177569ded124c4b710f052942e943 (patch)
treeba43997f1332a57c8524079d79555a5b59c17561 /lib
parenta7491a345f71b7805d2141424e505408e46e1297 (diff)
db-iris: Add -c / --class option, rename -m/--mot to -T/--type
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm2
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm20
2 files changed, 17 insertions, 5 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 203c9bf..81c6797 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -88,7 +88,7 @@ sub add_result {
my %data = (
raw_id => $id,
- class => $e_tl->getAttribute('f'), # D N S F
+ classes => $e_tl->getAttribute('f'), # D N S F
unknown_t => $e_tl->getAttribute('t'), # p
train_no => $e_tl->getAttribute('n'), # dep number
type => $e_tl->getAttribute('c'), # S/ICE/ERB/...
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 016393d..4eb3096 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -16,10 +16,10 @@ use List::MoreUtils qw(uniq);
our $VERSION = '0.00';
Travel::Status::DE::IRIS::Result->mk_ro_accessors(
- qw(arrival date datetime delay departure is_cancelled line_no platform raw_id
- realtime_xml route_start route_end
- sched_arrival sched_departure sched_route_start sched_route_end
- start stop_no time train_id train_no type unknown_t unknown_o)
+ qw(arrival classes date datetime delay departure is_cancelled line_no
+ platform raw_id realtime_xml route_start route_end sched_arrival
+ sched_departure sched_route_start sched_route_end start stop_no time
+ train_id train_no type unknown_t unknown_o)
);
sub new {
@@ -398,6 +398,18 @@ the platform, time, route and more.
DateTime(3pm) object for the arrival date and time. undef if the
train starts here. Contains realtime data if available.
+=item $result->classes
+
+List of characters indicating the class(es) of this train, may be empty. This
+is slighty related to B<type>, but more generic. At this time, the following
+classes are known:
+
+ D Non-DB train. Usually local transport
+ D,F Non-DB train, long distance transport
+ F "Fernverkehr", long-distance transport
+ N "Nahverkehr", local and regional transport
+ S S-Bahn, rather slow local/regional transport
+
=item $result->date
Scheduled departure date if available, arrival date otherwise (e.g. if the