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

Location: Add ->operator accessor

parent eea918a3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -189,6 +189,10 @@ sub route {
	  = map {
		Travel::Status::DE::DBRIS::Location->new(
			json     => $_,
			operator =>
			  scalar Travel::Status::DE::DBRIS::Operators::get_operator_name(
				$_->{adminID}
			  ),
			strptime_obj => $self->{strptime_obj}
		)
	  } ( @{ $self->{raw_route} // [] },
+2 −1
Original line number Diff line number Diff line
@@ -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} ) {