From c808d938c78ef8dea89bee8fee3632497fd5e170 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 4 Oct 2024 08:49:01 +0200 Subject: EFA, Trip: Add stop_id accessor --- lib/Travel/Status/DE/EFA/Trip.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status/DE/EFA/Trip.pm') diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index 37e5284..b61c215 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -68,7 +68,7 @@ sub route { for my $stop ( @{ $self->{route_raw} // [] } ) { my $chain = $stop; - my ( $platform, $place, $name, $name_full ); + my ( $platform, $place, $name, $name_full, $stop_id ); while ( $chain->{type} ) { if ( $chain->{type} eq 'platform' ) { $platform = $chain->{properties}{platformName} @@ -77,6 +77,7 @@ sub route { elsif ( $chain->{type} eq 'stop' ) { $name = $chain->{disassembledName}; $name_full = $chain->{name}; + $stop_id = $chain->{properties}{stopId}; } elsif ( $chain->{type} eq 'locality' ) { $place = $chain->{name}; @@ -97,6 +98,7 @@ sub route { niveau => $stop->{niveau}, platform => $platform, id => $stop->{id}, + stop_id => $stop_id, ) ); } -- cgit v1.2.3