From 255a67f025ff4f59086da6c8a9355804a8ee4add Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 16 Jan 2017 09:26:16 +0100 Subject: Document message support / with_messages --- lib/Travel/Status/DE/URA.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/Travel') 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 meters away from the location specified by I and I. Example parameter: "50.78496,6.10897,100". +=item B => 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 => 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 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 -- cgit v1.2.3