Loading lib/Travel/Status/DE/HAFAS.pm +17 −2 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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 Loading Loading
lib/Travel/Status/DE/HAFAS.pm +17 −2 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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 Loading