diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-11-17 21:43:28 +0100 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-11-17 21:43:28 +0100 |
| commit | b4ecfde631bed1356b5c51df6819b9116e8c7808 (patch) | |
| tree | fee09d9cc58c8fe50c431194b28562560ae6bd8b /lib | |
| parent | eea918a31e59e0e639cb20b86bb83f0cb945ebed (diff) | |
Location: Add ->operator accessor
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Travel/Status/DE/DBRIS/Journey.pm | 6 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/DBRIS/Location.pm | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Journey.pm b/lib/Travel/Status/DE/DBRIS/Journey.pm index ca01624..654bd11 100644 --- a/lib/Travel/Status/DE/DBRIS/Journey.pm +++ b/lib/Travel/Status/DE/DBRIS/Journey.pm @@ -188,7 +188,11 @@ sub route { @{ $self->{route} } = map { Travel::Status::DE::DBRIS::Location->new( - json => $_, + json => $_, + operator => + scalar Travel::Status::DE::DBRIS::Operators::get_operator_name( + $_->{adminID} + ), strptime_obj => $self->{strptime_obj} ) } ( @{ $self->{raw_route} // [] }, diff --git a/lib/Travel/Status/DE/DBRIS/Location.pm b/lib/Travel/Status/DE/DBRIS/Location.pm index 88cb04f..9eb356b 100644 --- a/lib/Travel/Status/DE/DBRIS/Location.pm +++ b/lib/Travel/Status/DE/DBRIS/Location.pm @@ -9,7 +9,7 @@ use parent 'Class::Accessor'; our $VERSION = '0.18'; Travel::Status::DE::DBRIS::Location->mk_ro_accessors( - qw(eva id lat lon name admin_id products type is_cancelled is_additional is_separation display_priority + qw(eva id lat lon name admin_id operator products type is_cancelled is_additional is_separation display_priority trip_no dep arr sched_dep sched_arr rt_dep rt_arr arr_delay dep_delay delay platform sched_platform rt_platform occupancy_first occupancy_second occupancy @@ -40,6 +40,7 @@ sub new { is_additional => $json->{additional}, sched_platform => $json->{gleis}, rt_platform => $json->{ezGleis}, + operator => $opt{operator}, }; if ( $json->{abfahrtsZeitpunkt} ) { |
