From a187abe014ee0d7dcd9228d72b20206414fb8ce5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 19 Nov 2022 21:58:25 +0100 Subject: Parse "hi" (arrival_hidden/departure_hidden) attributes --- lib/Travel/Status/DE/IRIS/Result.pm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'lib/Travel/Status/DE/IRIS') diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index 9325de5..25abb0a 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -130,9 +130,9 @@ my %translation = ( ); Travel::Status::DE::IRIS::Result->mk_ro_accessors( - qw(arrival arrival_delay arrival_has_realtime arrival_is_additional arrival_is_cancelled + qw(arrival arrival_delay arrival_has_realtime arrival_is_additional arrival_is_cancelled arrival_hidden date datetime delay - departure departure_delay departure_has_realtime departure_is_additional departure_is_cancelled + departure departure_delay departure_has_realtime departure_is_additional departure_is_cancelled departure_hidden ds100 has_realtime is_transfer is_unscheduled is_wing line_no old_train_id old_train_no operator platform raw_id realtime_xml route_start route_end @@ -278,6 +278,10 @@ sub set_ar { $self->{arrival_is_cancelled} = 0; } + if ( $attrib{arrival_hidden} ) { + $self->{arrival_hidden} = $attrib{arrival_hidden}; + } + # unscheduled arrivals may not appear in the plan, but we do need to # know their planned arrival time if ( $attrib{plan_arrival_ts} ) { @@ -343,6 +347,10 @@ sub set_dp { $self->{departure_is_cancelled} = 0; } + if ( $attrib{departure_hidden} ) { + $self->{departure_hidden} = $attrib{departure_hidden}; + } + # unscheduled arrivals may not appear in the plan, but we do need to # know their planned arrival time if ( $attrib{plan_departure_ts} ) { @@ -911,6 +919,11 @@ no scheduled arrival time (e.g. due to diversions). May be negative. True if "arrival" is based on real-time data. +=item $result->arrival_hidden + +True if arrival should not be displayed to customers. +This often indicates an entry-only stop near the beginning of a train's journey. + =item $result->arrival_is_additional True if the arrival at this stop is an additional (unscheduled) event, i.e., @@ -984,6 +997,11 @@ no scheduled departure time (e.g. due to diversions). May be negative. True if "departure" is based on real-time data. +=item $result->departure_hidden + +True if departure should not be displayed to customers. +This often indicates an exit-only stop near the end of a train's journey. + =item $result->departure_is_additional True if the train's departure at this stop is unscheduled (additional), i.e., -- cgit v1.2.3