Add /stop/routes endpoint#1386
Open
Jouca wants to merge 5 commits intomotis-project:masterfrom
Open
Conversation
Author
|
Fixed formatting & errors, ready for a workflow run |
Author
|
Should be fixed again, ready for a workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes a new endpoint
/v1/stop/routes, designed to retrieve all routes serving a specific stop. This approach avoids relying on other endpoints (notably/stoptimes) to infer which routes pass through a stop, providing a more direct, efficient, and optimized solution.It follows discussion #742, which suggested introducing a dedicated endpoint to fetch routes from a stop. The current implementation focuses solely on stops and does not fully address all aspects of the original proposal. In particular, a more comprehensive solution could also consider a feed-level perspective, potentially through a separate endpoint (e.g.,
/v5/routes).Parameters for
/v1/stop/routes:stopIdstring/api/v1/geocodeor/api/v1/map/stopscenterstringlatitude,longitudepair used as center for a radius searchradiusinteger500centerlanguagestring[]en,fr,de)¹ Either
stopIdorcentermust be provided.Examples