diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-01-16 09:26:16 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-01-16 09:26:16 +0100 |
commit | 255a67f025ff4f59086da6c8a9355804a8ee4add (patch) | |
tree | f9a2d37a6f9534f8690250ebd79630bc0b0aa8fa /lib/Travel/Status/DE | |
parent | e5ab980cd4e1afba578b4085a48e011a717c1dd7 (diff) |
Document message support / with_messages
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r-- | lib/Travel/Status/DE/URA.pm | 17 |
1 files changed, 17 insertions, 0 deletions
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 |