Unverified Commit 9e247ba5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

HAFAS: Add arrival option

parent e273c5db
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
git HEAD

    * HAFAS->new: Add arrival option

Travel::Routing::DE::HAFAS 0.02 - Sat Nov 25 2023

    * hafas: Add -f / --full-route option
+10 −3
Original line number Diff line number Diff line
@@ -218,6 +218,7 @@ sub new {

	my $date    = ( $conf{datetime} // $now )->strftime('%Y%m%d');
	my $time    = ( $conf{datetime} // $now )->strftime('%H%M%S');
	my $outFrwd = $conf{arrival} ? \0 : undef;

	my ( $from_lid, $to_lid );
	if ( $self->{from_stop} =~ m{ ^ [0-9]+ $ }x ) {
@@ -243,7 +244,7 @@ sub new {
					numF       => 6,
					maxChg     => undef,
					minChgTime => undef,
					outFrwd    => undef,
					outFrwd    => $outFrwd,
					viaLocL    => undef,
					trfReq     => {
						cType    => 'PK',
@@ -692,6 +693,12 @@ must be specified either by name or by EVA ID (e.g. 8000080 for Dortmund Hbf).
Destination stop, e.g. "Essen HBf" or "Alfredusbad, Essen (Ruhr)". The stop
must be specified either by name or by EVA ID (e.g. 8000080 for Dortmund Hbf).

=item B<arrival> => I<bool>

If true: request connections that arrive at the destination before the
specified time. If false (default): request connections that leave at the
origin after the specified time.

=item B<cache> => I<Cache::File object>

Store HAFAS replies in the provided cache object.  This module works with