Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new VIA and REALTIME capabilities #333

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ialokim
Copy link
Contributor

@ialokim ialokim commented Sep 13, 2020

This PR adds three new capabilities for network providers:

  • TRIPS_VIA for providers that allow specifying a location to pass by
  • DEPARTURES_REALTIME for providers that support real-time data on departures
  • TRIPS_REALTIME for providers that support real-time data on trip queries.

As discussed in #95, the new capabilities are split into different commits.

Fixes #95.


This is a copied and rebased version of #210 after the source repository has been deleted. Sorry for the noise here.

@schildbach Would be nice to have this merged, if you have no further objections.

@schildbach
Copy link
Owner

I took the liberty and split your first commit into two (the refactoring and adding the TRIPS_VIA cap).

About the REALTIME caps, I'm not really confident they're useful. It depends on individual vehicels (e.g. bus) wether realtime data is available or not.

@ialokim
Copy link
Contributor Author

ialokim commented Sep 15, 2020

Thanks a lot for merging the TRIPS_VIA capability!


About the REALTIME caps, I'm not really confident they're useful. It depends on individual vehicels (e.g. bus) wether realtime data is available or not.

As already stated in #210 (comment), I think it would nevertheless make sense for e.g. hiding the refresh functionality altogether in a client, if the API does never expose realtime data (as e.g. Navitia based providers).

Just relying on the actual availability of realtime data in a specific trip at a specific point in time might not be enough: It might happen that a provider first doesn't send realtime information (e.g. if the vehicle is still not registered in the system or the trip lies some hours in the future) but later would be able to serve realtime data. A Trip.hasRealtime() method would then not be useful for the decision whether the refresh button should be showed or hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Capability: VIA and REALTIME
2 participants