summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ura-m6
-rw-r--r--lib/Travel/Status/DE/URA.pm17
2 files changed, 20 insertions, 3 deletions
diff --git a/bin/ura-m b/bin/ura-m
index 3111cda..6cd0d7d 100755
--- a/bin/ura-m
+++ b/bin/ura-m
@@ -308,9 +308,9 @@ version 2.00
=head1 DESCRIPTION
-B<ura-m> lists upcoming bus departures at the URA stop I<name>.
-It only shows realtime data and has no knowledge of schedules or delays.
-Departures without such data may not appear at all.
+B<ura-m> lists upcoming bus departures and bus service messages at the stop
+I<name>. It only shows realtime data and has no knowledge of schedules or
+delays. Departures without such data may not appear at all.
=head1 OPERATOR SELECTION
diff --git a/lib/Travel/Status/DE/URA.pm b/lib/Travel/Status/DE/URA.pm
index be405c2..5d8a756 100644
--- a/lib/Travel/Status/DE/URA.pm
+++ b/lib/Travel/Status/DE/URA.pm
@@ -476,6 +476,13 @@ Only request departures for stops which are located up to I<dist> meters
away from the location specified by I<lon> and I<lat>. Example parameter:
"50.78496,6.10897,100".
+=item B<with_messages> => B<0>|B<1>
+
+When set to B<1> (or any other true value): Also requests stop messages from
+the URA service. Thene can include texts such as "Expect delays due to snow and
+ice" or "stop closed, use replacement stop X instead". Use
+C<< $status->messages >> to access them.
+
=item B<with_stops> => B<0>|B<1>
When set to B<1> (or any other true value): Also request all stops satisfying
@@ -510,6 +517,16 @@ Travel::Status::DE::URA::Stop(3pm) object describing it.
Only works when $status was created with B<with_stops> set to a true value.
Otherwise, undef is returned.
+=item $status->messages_by_stop_id($stop_id)
+
+Returns a list of messages for the stop with the ID I<$stop_id>.
+At the moment, each message is a simple string. This may change in the future.
+
+=item $status->messages_by_stop_name($stop_id)
+
+Returns a list of messages for the stop with the name I<$stop_name>.
+At the moment, each message is a simple string. This may change in the future.
+
=item $status->results(I<%opt>)
Returns a list of Travel::Status::DE::URA::Result(3pm) objects, each describing