summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm28
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm114
2 files changed, 58 insertions, 84 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 508ed28..7cb35ea 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -133,3 +133,31 @@ sub results {
}
1;
+
+__END__
+
+=head1 NAME
+
+Travel::Status::DE::IRIS - Interface to IRIS based web departure monitors.
+
+=head1 SYNOPSIS
+
+TODO
+
+=head1 VERSION
+
+version 0.00
+
+=head1 DESCRIPTION
+
+TraveL::Status::DE::IRIS is an unofficial interface to IRIS based web
+departure monitors such as
+L<https://iris.noncd.db.de/wbt/js/index.html?typ=ab&style=qrab&bhf=EE&SecLang=&Zeilen=20&footer=0&disrupt=0>.
+
+=head1 AUTHOR
+
+Copyright (C) 2013 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt>
+
+=head1 LICENSE
+
+This module is licensed under the same terms as Perl itself.
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 665be76..a952cd9 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -15,9 +15,9 @@ our $VERSION = '0.00';
Travel::Status::DE::IRIS::Result->mk_ro_accessors(
qw(arrival_date arrival_datetime arrival_time date datetime
- departure_date departure_datetime departure_time line_no
+ departure_date departure_datetime departure_time line_no raw_id
start_date start_datetime start_time stop_no
- raw_id stop_no time train_id train_no
+ time train_id train_no
type unknown_t unknown_o)
);
@@ -152,8 +152,8 @@ __END__
=head1 NAME
-Travel::Status::DE::DeutscheBahn::Result - Information about a single
-arrival/departure received by Travel::Status::DE::DeutscheBahn
+Travel::Status::DE::IRIS::Result - Information about a single
+arrival/departure received by Travel::Status::DE::IRIS
=head1 SYNOPSIS
@@ -184,8 +184,8 @@ version 1.02
=head1 DESCRIPTION
-Travel::Status::DE::DeutscheBahn::Result describes a single arrival/departure
-as obtained by Travel::Status::DE::DeutscheBahn. It contains information about
+Travel::Status::DE::IRIs::Result describes a single arrival/departure
+as obtained by Travel::Status::DE::IRIS. It contains information about
the platform, time, route and more.
=head1 METHODS
@@ -194,79 +194,45 @@ the platform, time, route and more.
=over
-=item $result->date
-
-Arrival/Departure date in "dd.mm.yyyy" format.
-
-=item $result->delay
-
-Returns the train's delay in minutes, or undef if it is unknown.
-
-=item $result->info
-
-Returns additional information, for instance the reason why the train is
-delayed. May be an empty string if no (useful) information is available.
-
-=item $result->line
+=item $result->arrival_date
-=item $result->train
+=item $result->arrival_datetime
-Returns the line name, either in a format like "S 1" (S-Bahn line 1)
-or "RE 10111" (RegionalExpress train 10111, no line information).
+=item $result->arrival_time
-=item $result->platform
-
-Returns the platform from which the train will depart / at which it will
-arrive.
-
-=item $result->route
-
-Returns a list of station names the train will pass between the selected
-station and its origin/destination.
-
-=item $result->route_end
+=item $result->date
-Returns the last element of the route. Depending on how you set up
-Travel::Status::DE::DeutscheBahn (arrival or departure listing), this is
-either the train's destination or its origin station.
+=item $result->datetime
-=item $result->destination
+=item $result->departure_date
-=item $result->origin
+=item $result->departure_datetime
-Convenience aliases for $result->route_end.
+=item $result->departure_time
-=item $result->route_interesting([I<max>])
+=item $result->line_no
-Returns a list of up to I<max> (default: 3) interesting stations the train
-will pass on its journey. Since deciding whether a station is interesting or
-not is somewhat tricky, this feature should be considered experimental.
+=item $result->raw_id
-The first element of the list is always the train's next stop. The following
-elements contain as many main stations as possible, but there may also be
-smaller stations if not enough main stations are available.
+=item $result->start_date
-In future versions, other factors may be taken into account as well. For
-example, right now airport stations are usually not included in this list,
-although they should be.
+=item $result->start_datetime
-Note that all main stations will be stripped of their "Hbf" suffix.
+=item $result->start_time
-=item $result->route_raw
+=item $result->stop_no
-Returns the raw string used to create the route array.
+=item $result->time
-Note that canceled stops are filtered from B<route>, but still present in
-B<route_raw>.
+=item $result->train_id
-=item $result->route_timetable
+=item $result->train_no
-Similar to B<route>. however, this function returns a list of array
-references of the form C<< [ arrival time, station name ] >>.
+=item $result->type
-=item $result->time
+=item $result->unknown_t
-Returns the arrival/departure time as string in "hh:mm" format.
+=item $result->unknown_o
=back
@@ -274,31 +240,11 @@ Returns the arrival/departure time as string in "hh:mm" format.
=over
-=item $result = Travel::Status::DE::DeutscheBahn::Result->new(I<%data>)
+=item $result = Travel::Status::DE::IRIS::Result->new(I<%data>)
-Returns a new Travel::Status::DE::DeutscheBahn::Result object.
+Returns a new Travel::Status::DE::IRIS::Result object.
You usually do not need to call this.
-Required I<data>:
-
-=over
-
-=item B<time> => I<hh:mm>
-
-=item B<train> => I<string>
-
-=item B<route_raw> => I<string>
-
-=item B<route> => I<arrayref>
-
-=item B<route_end> => I<string>
-
-=item B<platform> => I<string>
-
-=item B<info_raw> => I<string>
-
-=back
-
=back
=head1 DIAGNOSTICS
@@ -319,11 +265,11 @@ None known.
=head1 SEE ALSO
-Travel::Status::DE::DeutscheBahn(3pm).
+Travel::Status::DE::IRIS(3pm).
=head1 AUTHOR
-Copyright (C) 2011 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt>
+Copyright (C) 2013 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt>
=head1 LICENSE