Thanks in advance
Are you using your app_key when making the requests? I think this behaviour can be seen if you fail to use your app_key.
Thanks for the reply Brian. Yes app_key and id both in there for the requests.
Hi @abodian, can you please try again? We’ve reset our API cache just now which should hopefully resolve the issue
Hello, still seems to jump around a lot. I’ve shown an example in this video:
You can see on lines 16 and 17 of the postman console that the timestamp and seconds to arrival are jumping up and down and alternating between older timestamps and new timestamps. Unless I’m misinterpreting things.
The link expires after a day.
I have the similar issue
Sometimes expectedArrival changes to the old date.
Today I got 2023-02-27 several times in the response
Im not sure this is doable as what TfL provide are predictions, so it may or may not always align with when the train actually arrives.
i feel like this kind of app would require a entirely different API to what TFL provide us i.e. some type of implementation like websockets or even webRTC (though this probs wouldn’t scale) and GPS on every TfL vehicle this is doable in theory i’m not entirely sure if TfL desire to do this in practice
its a cool idea though its just my experience of the API and mapping it on to reality tell me although , you’d be better off signalling to your users when the train is 1 minute away (but understand in reality it might not be as it could be delayed for a myriad of reasons).
The predictions loosely showcase what is going on for example, the buses with vehicle registration nos turn up sometimes well after the “expectedArrival” sometimes not at all ,sometimes before sometimes there are buses that arrive that have vehicle reg nos that are not present in the data for the entire day (i have checked, lol)
i’m sure there are perfectly plausible reasons for the above and as i am writing this i could think of some , but from my experience with the API i would say your app would be impossible to build with the API that TfL currently provide, you should tweak your expectation for now to nowish lol to put crudely or from "your train as arrived " to "due ".
“Due” is what most consumers of TfL in all honesty are used to anyway that or delayed by n minute(s) lol.