replace inconsistent rider count with destination and heading

This commit is contained in:
steven 2025-05-18 15:15:22 -04:00
parent 4025bc115b
commit d104b16fc2
2 changed files with 7 additions and 9 deletions

2
app.py
View file

@ -20,7 +20,7 @@ def index():
@cache.cached(timeout=5)
def tarc():
d=httpx.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs=0,"+routes).json()
return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d)
return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['Heading']},{v['DirectionLong']},{v['Destination']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d)
@app.route('/<int:stop>')
@cache.cached(timeout=5)