Hi there
I’m using the /Mode/{mode}/Arrivals endpoint to collect arrival times for all stops on both the dlr and tube (so I make one request for each mode). I set the ‘count’ variable to 10 to try and get the latest 10 results (or however many there are) for each station.
Sometimes when I get the data back, say 900 results for the tube, I find that all the expectedArrival timestamps are all within 2 or 3 seconds. The same is true of the corresponding timeToStation times.
I’ve noticed that these grouped predictions are usually predicted to arrive slightly in the past, within a minute of the time I made the query. I assume that this means they have already arrived.
But then often there aren’t any further predictions.
Sometimes I’ll get the arrival times spread out in a more expected way, i.e. over the next 10-20 minutes.
Sometimes I’ll get 1800 results, sometimes just 100, with calls made just minutes apart.
My request is formed like this:
https://api.tfl.gov.uk//mode/tube/arrivals?app_id=[appid]&app_key=[key]&count=10
Am I doing something wrong, are my expectations for this endpoint wrong, or is there something else going on?
Thanks!
Richard