-
Notifications
You must be signed in to change notification settings - Fork 59
Enhancement: Use /api/v1/trains/checkin
with transitous stop ids
#3345
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
Comments
I've removed this from the original migration parent issue because this is not directly needed to fulfil the direct functionality. While we could accept the motis/transitous endpoint ID, we've decided in the past that we don't want to work with external identifiers in our api. In the long run we wanted to possibly integrate multiple API sources, which would only make this more difficult. The IBNR is a remaining legacy of old processes and internal workings of Träwelling and the (slow) refactoring of the ui. As a workaroud you could still query the autocomplete endpoint of Träwelling with the exact name of your station. That way you'll directly get a Träwelling ID. We could still implement this but with the following suggestion:
We'll look into it, how/what we're going to do with it, once we're over the transitous migration. |
/api/v1/trains/checkin
with transitous stop ids/api/v1/trains/checkin
with transitous stop ids
This patch adds support for checkins using MOTIS backends using the Travel::Status::MOTIS module. With this travelynx supports the two services currently exposed by the module, RNV for local transit in Mannheim, Germany and surrounding cities and transitous for worldwide crowdsourced tranit feeds. This implementation supports realtime predictions, cancellations and polylines as well as custom route colors if available. As MOTIS doesn't expose names of indivial trips currently, displaying transports is mostly limited to route names. MOTIS uses strings for stop ids, based on the used GTFS source feeds. As travelynx's data model currently assumes interger station ids, this patch adds a mapping table to the database. This patch assumes support for MOTIS in db-fakedisplay. Note that while träwelling has migrated to tranitous fully sync remains unsupported for now. See Traewelling/traewelling#3345
Squashed commit of the following: commit c7c8b2e Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Mon Jun 9 13:08:57 2025 +0200 fix another merge issue commit d2ae55c Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Mon Jun 9 13:08:39 2025 +0200 Stations: get_by_external_id is a slow function commit 7251744 Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Mon Jun 9 13:05:48 2025 +0200 ... I accidentally commited a merge conflict commit c695494 Merge: e5da62b 3322ca2 Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Mon Jun 9 12:46:08 2025 +0200 Merge branch 'main' into motis commit e5da62b Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Wed Apr 30 18:15:39 2025 +0200 cpanfile: add Travel::Status::MOTIS dependency commit 180723a Merge: 479373b c90ae4c Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Wed Apr 30 18:13:45 2025 +0200 Merge branch 'main' into motis commit 479373b Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Wed Apr 30 18:06:41 2025 +0200 database: remove duplicate users_with_backend migration commit 94c8b5a Author: Birte Kristina Friesel <derf@finalrewind.org> Date: Wed Apr 30 18:06:04 2025 +0200 Do not store train colours in database. They're only supported by MOTIS. commit d58f23c Author: networkException <git@nwex.de> Date: Fri Apr 18 11:47:02 2025 +0200 Initial MOTIS backend support This patch adds support for checkins using MOTIS backends using the Travel::Status::MOTIS module. With this travelynx supports the two services currently exposed by the module, RNV for local transit in Mannheim, Germany and surrounding cities and transitous for worldwide crowdsourced tranit feeds. This implementation supports realtime predictions, cancellations and polylines as well as custom route colors if available. As MOTIS doesn't expose names of indivial trips currently, displaying transports is mostly limited to route names. MOTIS uses strings for stop ids, based on the used GTFS source feeds. As travelynx's data model currently assumes interger station ids, this patch adds a mapping table to the database. This patch assumes support for MOTIS in db-fakedisplay. Note that while träwelling has migrated to tranitous fully sync remains unsupported for now. See Traewelling/traewelling#3345
Uh oh!
There was an error while loading. Please reload this page.
Describe the problem
When implementing support for checking in using the api it is not possible to use transitous stop ids, as the
start
anddestination
station fields need to be a träwelling internal id or an ibnr.While this could be solved by adding an endpoint to query träwelling's data model for transitous station identifiers, this only works with träwelling having fetched the stations previously. Ideally the checkin api would fetch the transitous trip first, discovering all stopover stations in the process.
The text was updated successfully, but these errors were encountered: