Open athuler opened 4 months ago
You may be interested in this collection of repos, specifically this repo. Perhaps you could pull from their API that has done the heavy lifting or poke around to see how they get their information. I appreciate having your library in python so the ladder may be more appealing, I'll look into it as well.
I've seen these repos around and they are amazing! I might add them to the readme as an additional resource for people who may be interested!
For the ETA, I would like to stay with the native PassioGo API. The native ETA request structure is https://passiogo.com/mapGetData.php?eta=3&deviceId=59804559&stopIds=cta1514
. (Sorry for not including it in the issue in the first place!) It seems that it's not as straightforward as the other requests, but it seems parseable.
And thanks for your PR! I'll take a look at your work!
I just realized that I incorrectly claimed that the min()
operation performed in Stop.getNextVehicle()
would operate in O(1) time complexity. In reality, that method could simply return Stop.getEtas()[0]
as PassioGo presents them in ascending order by eta, and therefore the entire method may not be required.
We may simply want to state in the docstring for Stop.getEtas()
that etas are considered to be sorted upon creation.
I've opened #31 that addresses issues I missed initially.
Allow for the querying of estimated arrival times