User Manual
Version 7.6
×

Getting an arrival forecast for a stopover

 
Example:
https://<address>/api/api.php?cmd=stationForecast
 
Parameter:
cmd :stationForecast
stopid: stop ID (taken from the list of stops in the PILOT interface)
 
 
Request:
https://<address>/api/api.php?cmd=stationForecast&stopid=7400
 
Answer:
An array with predicted arrivals of buses of different lines to this stop
[
{
 "current_stop": 1, // Serial number of the stop in the route where the vehicle is currently located
 "line_id": 1371, // route ID
 "line_name": "No. 17 S. KALFA - PL. SUVOROVA - ST. GENERAL ZHIDILOVA", // Route name
 "line_num": "17", // Route number
 "line_type": "A" // Route type ('A' - bus, 'T' - trolley bus, 'M' - minibus)
 "this_stop": 32, // Number of this stop in the route
 "time": 4065, // Time to arrive at this stop in seconds
 "vehicle": "BUS FLIGHT", // License plate of the vehicle
 "vehid": 48854 // vehicle ID
}
]