summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-23 18:46:53 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-23 18:46:53 +0200
commitbf0b8b26f4484afb8b5d248e12f967e67d302547 (patch)
treea5e3623723d74d2c0edd4e902e4f3b3f203417a8 /lib/Travel/Status
parent2c2bd4721631b8a847882aa7c835e2e259f83f33 (diff)
HAFAS(3pm): document similar_stops_p4.15
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index b479e6f..e2c23c8 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -1015,11 +1015,11 @@ Request a polyline (series of geo-coordinates) indicating the train's route.
=item my $status_p = Travel::Status::DE::HAFAS->new_p(I<%opt>)
-Return a promise that resolves into a Travel::Status::DE::HAFAS instance
+Returns a promise that resolves into a Travel::Status::DE::HAFAS instance
($status) on success and rejects with an error message on failure. If the
failure occured after receiving a response from the HAFAS backend, the rejected
promise contains a Travel::Status::DE::HAFAS instance as a second argument.
-This instance can be used e.g. to call similar_stops in case of an ambiguous
+This instance can be used e.g. to call similar_stops_p in case of an ambiguous
location specifier. In addition to the arguments of B<new>, the following
mandatory arguments must be set.
@@ -1099,6 +1099,21 @@ HAFAS backend could not identify the stop.
See Travel::Status::DE::HAFAS::StopFinder(3pm)'s B<results> method for details
on the return value.
+=item $status->similar_stops_p(I<%opt>)
+
+Returns a promise resolving to a list of hashrefs describing stops whose name
+is similar to the one requested in the constructor's B<station> parameter.
+Returns nothing if the active service does not support this feature. This is
+most useful if B<errcode> returns 'LOCATION', which means that the HAFAS
+backend could not identify the stop.
+
+See Travel::Status::DE::HAFAS::StopFinder(3pm)'s B<results> method for details
+on the resolved values.
+
+If $status has been created using B<new_p>, this function does not require
+arguments. Otherwise, the caller must specify B<promise> and B<user_agent>
+(see B<new_p> above).
+
=item $status->get_active_service
Returns a hashref describing the active service when a service is active and