From a6b9a58d4c5e2b0263dfde41257a87237739d996 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 4 Feb 2023 17:59:42 +0100 Subject: Journey: rename uic to eva --- lib/Travel/Status/DE/HAFAS/Journey.pm | 13 +++++++++---- lib/Travel/Status/DE/HAFAS/StopFinder.pm | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'lib/Travel/Status/DE') diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index 69f8434..2d13288 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -15,7 +15,7 @@ our $VERSION = '4.05'; Travel::Status::DE::HAFAS::Journey->mk_ro_accessors( qw(datetime sched_datetime rt_datetime is_cancelled is_partially_cancelled - station station_uic platform sched_platform rt_platform operator + station station_eva platform sched_platform rt_platform operator id name type type_long class number line line_no load delay route_end route_start origin destination direction) ); @@ -200,7 +200,7 @@ sub new { if ( $journey->{stbStop} ) { $ref->{station} = $locL[ $journey->{stbStop}{locX} ]->{name}; - $ref->{station_uic} = 0 + $locL[ $journey->{stbStop}{locX} ]->{extId}; + $ref->{station_eva} = 0 + $locL[ $journey->{stbStop}{locX} ]->{extId}; $ref->{sched_platform} = $journey->{stbStop}{dPlatfS}; $ref->{rt_platform} = $journey->{stbStop}{dPlatfR}; $ref->{platform} = $ref->{rt_platform} // $ref->{sched_platform}; @@ -254,6 +254,12 @@ sub new { # {{{ Accessors +# Legacy +sub station_uic { + my ($self) = @_; + return $self->{station_eva}; +} + sub is_changed_platform { my ($self) = @_; @@ -546,10 +552,9 @@ if the backend does not provide an operator. Name of the station at which this journey was requested. -=item $journey->station_uic (station only) +=item $journey->station_eva (station only) UIC/EVA ID of the station at which this journey was requested. -May be renamed in future releases. =item $journey->route diff --git a/lib/Travel/Status/DE/HAFAS/StopFinder.pm b/lib/Travel/Status/DE/HAFAS/StopFinder.pm index 6c02373..1cc22f3 100644 --- a/lib/Travel/Status/DE/HAFAS/StopFinder.pm +++ b/lib/Travel/Status/DE/HAFAS/StopFinder.pm @@ -260,8 +260,8 @@ no error occurred, returns undef. =item $stopfinder->results Returns a list of stop candidates. Each list element is a hash reference. The -hash keys are B (IBNR / UIC station code) and B (stop name). Both can -be used as input for the Travel::Status::DE::HAFAS(3pm) constructor. +hash keys are B (IBNR / EVA / UIC station code) and B (stop name). +Both can be used as input for the Travel::Status::DE::HAFAS(3pm) constructor. If no matching results were found or the parser / HTTP request failed, returns the empty list. -- cgit v1.2.3