show route 0
This commit is contained in:
parent
750a4f0505
commit
ed177817e3
2 changed files with 4 additions and 4 deletions
2
app.py
2
app.py
|
@ -20,5 +20,5 @@ routes=",".join(str(r.get("RouteId")) for r in data)
|
|||
@app.route("/tarc.csv")
|
||||
@cache.cached(timeout=5)
|
||||
def tarc():
|
||||
d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs="+routes).json()
|
||||
d=requests.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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue