From bbfbaa63bd7c3da1146cd248719e32eb90fc6ba2 Mon Sep 17 00:00:00 2001 From: networkException Date: Mon, 9 Jun 2025 13:36:20 +0200 Subject: Trip: Add route_text_color accessor --- lib/Travel/Status/MOTIS/Trip.pm | 14 ++++++++------ lib/Travel/Status/MOTIS/TripAtStopover.pm | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/Travel/Status/MOTIS/Trip.pm b/lib/Travel/Status/MOTIS/Trip.pm index 42e75b8..a01f2e6 100644 --- a/lib/Travel/Status/MOTIS/Trip.pm +++ b/lib/Travel/Status/MOTIS/Trip.pm @@ -20,6 +20,7 @@ Travel::Status::MOTIS::Trip->mk_ro_accessors( agency route_name route_color + route_text_color headsign is_realtime @@ -41,12 +42,13 @@ sub new { my $json = $opt{json}{legs}[0]; my $ref = { - id => $json->{tripId}, - mode => $json->{mode}, - agency => $json->{agencyName}, - route_name => $json->{routeShortName}, - route_color => $json->{routeColor}, - headsign => $json->{headsign}, + id => $json->{tripId}, + mode => $json->{mode}, + agency => $json->{agencyName}, + route_name => $json->{routeShortName}, + route_color => $json->{routeColor}, + route_text_color => $json->{routeTextColor}, + headsign => $json->{headsign}, is_cancelled => $json->{cancelled}, is_realtime => $json->{realTime}, diff --git a/lib/Travel/Status/MOTIS/TripAtStopover.pm b/lib/Travel/Status/MOTIS/TripAtStopover.pm index 2d58f98..13fc85e 100644 --- a/lib/Travel/Status/MOTIS/TripAtStopover.pm +++ b/lib/Travel/Status/MOTIS/TripAtStopover.pm @@ -17,6 +17,7 @@ Travel::Status::MOTIS::TripAtStopover->mk_ro_accessors( agency route_name route_color + route_text_color headsign is_cancelled @@ -32,12 +33,13 @@ sub new { my $json = $opt{json}; my $ref = { - id => $json->{tripId}, - mode => $json->{mode}, - agency => $json->{agencyName}, - route_name => $json->{routeShortName}, - route_color => $json->{routeColor}, - headsign => $json->{headsign}, + id => $json->{tripId}, + mode => $json->{mode}, + agency => $json->{agencyName}, + route_name => $json->{routeShortName}, + route_color => $json->{routeColor}, + route_text_color => $json->{routeTextColor}, + headsign => $json->{headsign}, is_cancelled => $json->{cancelled}, is_realtime => $json->{realTime}, -- cgit v1.2.3