This commit is contained in:
2025-11-15 18:05:31 +01:00
parent 5dc296805a
commit 716bd0816c
5 changed files with 189 additions and 174 deletions

View File

@@ -144,13 +144,17 @@ func main() {
break
}
}
agencyName := ""
if trip.Agency != nil {
agencyName = trip.Agency.AgencyName
}
tripData := map[string]interface{}{
"trip_id": trip.TripId,
"headsign": trip.TripHeadsign,
"short_name": trip.TripShortName,
"route_id": trip.RouteID,
"agency_id": trip.AgencyID,
"agency_name": trip.Route.Agency.AgencyName,
"route_id": trip.RouteId,
"agency_id": trip.AgencyId,
"agency_name": agencyName,
"stops": []map[string]interface{}{},
}
for _, st := range trip.Stops[startIdx:] {