schildbach / public-transport-enabler

Unleash public transport data in your Java project.
https://groups.google.com/forum/#!forum/public-transport-enabler-discuss
GNU General Public License v3.0
388 stars 133 forks source link

Return more information regarding departures #300

Open ialokim opened 4 years ago

ialokim commented 4 years ago

In other public transport navigation apps, it is often possible to click on a line in the departures screen and see it's complete journey from start to end point. How this is done under the hood is saving a trip id for each departures result and querying the API again providing this trip id in case of a click. This is already supported by hafas-client and Navitia has also support for it using the Vehicle-journey endpoint.

Is this something you already thought about? I would like to look into this if you want me to do so and if you could give me some hints where I should start @schildbach.

ialokim commented 4 years ago

Just for the record: hafas-client implements the querying in https://github.com/public-transport/hafas-client/blob/master/index.js#L341.

It seems they return a journey object similar to the normal trip query results.

schildbach commented 4 years ago

I've often thought about this, but never found the time to implement. On Hafas I think I've seen a separate endpoint just for that usecase.