pgrimaud / horaires-ratp-api

Webservice pour les horaires et trafic RATP en temps réel
https://api-ratp.pierre-grimaud.fr/v4
MIT License
269 stars 30 forks source link

StationStatus & NumberofVehicles #49

Closed jkenna17 closed 7 years ago

jkenna17 commented 7 years ago

Hi Pierre ,

Would it be possible to get the status of all stations on the network at once? (in a single GET request) e.g Train at station. Train approaching

Also

Would it be possible to get the total number of vehicles active in the network ?

PS: Great work in making this data easily accessible.

Kind Regards James

pgrimaud commented 7 years ago

Hello James,

The official RATP API doesn't expose this data and I have no idea how to retrieve it. Moreover, this data is a little bit critical and can be misused.

Sorry about it. 😞

Best regards Pierre

jkenna17 commented 7 years ago

Thank you for your response Pierre,

My apologies,I didn't really think of it as a security issue. But I guess that makes sense from someone using the data locally. But my influence should be difficult being located in Australia. FYI I'm trying to create a interactive wall display that shows all the activity on the network using your API. ( So nothing nefarious on my part).

I have it working in part using your "schedules" method but would like to make the code more efficient. As currently I have to make a GET request for every station in every direction. Over 600 in total and the ESP8266 just can't make these requests fast enough to make the output useful as it take 3mins to refresh the data. Would it be possible to get "schedules" for an entire line at once in both directions? eg.https://api-ratp.pierre-grimaud.fr/v3/schedules/metros/1 As I currently parse your message[1] for every station and look for "Train a quai" and "Train a l'approche" to determine if a train is approaching or stopped at said station.

If you could help us out it would be greatly appreciated.

Kind Regards James