summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE')
-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