Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
Document message support / with_messages
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Jan 16, 2017
1 parent e5ab980 commit 255a67f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/ura-m
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions lib/Travel/Status/DE/URA.pm
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 255a67f

Please sign in to comment.