summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-12-22 15:17:54 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-12-22 15:17:54 +0100
commit91d1c93160cfd34bb667ca4ce1a9c380b5d6eea1 (patch)
treeb9c13f7d44c9b2b73fac14b78ff708bad5afff6c
parentf77816445f811813bbb9b2c4302a18539e234998 (diff)
update documentation
-rwxr-xr-xbin/aseag-m7
-rw-r--r--lib/Travel/Status/DE/ASEAG.pm6
-rw-r--r--lib/Travel/Status/DE/URA.pm18
-rw-r--r--lib/Travel/Status/DE/URA/Result.pm4
4 files changed, 18 insertions, 17 deletions
diff --git a/bin/aseag-m b/bin/aseag-m
index 57576a1..34db950 100755
--- a/bin/aseag-m
+++ b/bin/aseag-m
@@ -52,7 +52,7 @@ my $status = Travel::Status::DE::ASEAG->new;
sub show_help {
my ($code) = @_;
- print "Usage: B<aseag-m> [ B<-l> I<lines> ] [B<-f>] I< <stop name>\n"
+ print "Usage: aseag-m [-abfprV] [-l <lines>] [-v <stopname>] <stopname>\n"
. "See also: man aseag-m\n";
exit $code;
@@ -179,7 +179,8 @@ aseag-m - Unofficial interface to the ASEAG departure monitor
=head1 SYNOPSIS
-B<aseag-m> I<name>
+B<aseag-m> [B<-abfprV>] [B<-l> I<lines>] [B<-s> I<timefmt> | B<-S> I<timefmt>]
+[B<-v> I<stopname>] I<stopname>
=head1 VERSION
@@ -259,6 +260,8 @@ None.
=item * DateTime(3pm)
+=item * DateTime::Format::Duration(3pm)
+
=item * LWP::UserAgent(3pm)
=back
diff --git a/lib/Travel/Status/DE/ASEAG.pm b/lib/Travel/Status/DE/ASEAG.pm
index 3ef529a..83bb6b1 100644
--- a/lib/Travel/Status/DE/ASEAG.pm
+++ b/lib/Travel/Status/DE/ASEAG.pm
@@ -75,12 +75,6 @@ None.
=over
-=item * Class::Accessor(3pm)
-
-=item * DateTime(3pm)
-
-=item * LWP::UserAgent(3pm)
-
=item * Travel::Status::DE::URA(3pm)
=back
diff --git a/lib/Travel/Status/DE/URA.pm b/lib/Travel/Status/DE/URA.pm
index 5dbaff6..8ea404b 100644
--- a/lib/Travel/Status/DE/URA.pm
+++ b/lib/Travel/Status/DE/URA.pm
@@ -276,29 +276,29 @@ given place in real-time. Schedule information is not included.
Requests the departures as specified by I<opts> and returns a new
Travel::Status::DE::URA object.
-Accepted parameters (all are optional):
+The following two parameters are mandatory:
=over
-=item B<ura_base> => I<ura_base> (default C<< http://ivu.aseag.de/interfaces/ura >>)
+=item B<ura_base> => I<ura_base>
The URA base url.
-=item B<ura_version> => I<version> (default C<< 1 >>)
+=item B<ura_version> => I<version>
The version, may be any string.
=back
-The request URL is I<ura_base>/instant_VI<version>, so by default
-C<< http://ivu.aseag.de/interfaces/ura/instant_V1 >>.
+The request URL is I<ura_base>/instant_VI<version>, so for
+C<< http://ivu.aseag.de/interfaces/ura >>, C<< 1 >> this module will point
+requests to C<< http://ivu.aseag.de/interfaces/ura/instant_V1 >>.
Additionally, all options supported by C<< $status->results >> may be specified
here, causing them to be used as defaults. Note that while they may be
overridden later, they may limit the set of available departures requested from
the server.
-
=item $status->errstr
In case of an HTTP request error, returns a string describing it. If none
@@ -324,7 +324,7 @@ I<name> (if set).
=item B<fuzzy> => I<bool> (default 1)
-A true value allows fuzzy matching for the I<name> set above, a false one
+A true value allows fuzzy matching for the stop I<name>, a false one
requires an exact string match.
=item B<hide_past> => I<bool> (default 1)
@@ -359,6 +359,8 @@ None.
=item * DateTime(3pm)
+=item * List::MoreUtils(3pm)
+
=item * LWP::UserAgent(3pm)
=back
@@ -369,7 +371,7 @@ Many.
=head1 SEE ALSO
-aseag-m(1), Travel::Status::DE::URA::Result(3pm).
+Travel::Status::DE::URA::Result(3pm).
=head1 AUTHOR
diff --git a/lib/Travel/Status/DE/URA/Result.pm b/lib/Travel/Status/DE/URA/Result.pm
index dbf619f..f8eddcd 100644
--- a/lib/Travel/Status/DE/URA/Result.pm
+++ b/lib/Travel/Status/DE/URA/Result.pm
@@ -94,10 +94,12 @@ The number of the line.
=item $departure->route_timetable
+If the B<results> method of Travel::Status::DE::URA(3pm) was called with
+B<full_routes> => true:
Returns an arrayref of arrayrefs describing the entire route. I.e.
C<< [[$time1, $stop1], [$time2, $stop2], ...] >>.
The times are DateTime::Duration(3pm) objects, the stops are only names,
-not IDs (subject to change).
+not IDs (subject to change). Returns an empty arrayref otherwise.
=item $departure->stop