Repository navigation
Expose FeedInfo objects via IndexAPI - #2456
Merged
Merged
Conversation
Contributor
|
+1
…On Jun 14, 2017 5:32 PM, "Simon Jacobs" ***@***.***> wrote:
We have found it useful to be able to access GTFS FeedInfo
<https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#feed_infotxt>
information from OTP's API, in order to ensure that an OTP instance is
serving fresh data. I think this could be useful for other OTP users as
well.
This PR will serialize FeedInfo objects from GTFS feeds into the OTP
graph, and expose them via a new call /otp/routers/default/index/
feeds/{feedId} in IndexAPI. If the given feed ID does not exist, or that
feed does not supply feed_info.txt, the call will return a 404 (though of
course I'm open to feedback on this behavior).
------------------------------
You can view, comment on, or merge this pull request online at:
#2456
Commit Summary
- Serialize FeedInfo to the graph and expose via IndexAPI
File Changes
- *M* src/main/java/org/opentripplanner/index/IndexAPI.java
<https://github.com/opentripplanner/OpenTripPlanner/pull/2456/files#diff-0>
(12)
- *M* src/main/java/org/opentripplanner/routing/edgetype/factory/
GTFSPatternHopFactory.java
<https://github.com/opentripplanner/OpenTripPlanner/pull/2456/files#diff-1>
(8)
- *M* src/main/java/org/opentripplanner/routing/graph/Graph.java
<https://github.com/opentripplanner/OpenTripPlanner/pull/2456/files#diff-2>
(11)
- *M* src/main/java/org/opentripplanner/routing/graph/GraphIndex.java
<https://github.com/opentripplanner/OpenTripPlanner/pull/2456/files#diff-3>
(3)
Patch Links:
- https://github.com/opentripplanner/OpenTripPlanner/pull/2456.patch
- https://github.com/opentripplanner/OpenTripPlanner/pull/2456.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2456>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA4pLSlDZk6CdepNr8OKD-01bQuckcoOks5sEFFugaJpZM4N6d-_>
.
|
Closed
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.
We have found it useful to be able to access GTFS FeedInfo information from OTP's API, in order to ensure that an OTP instance is serving fresh data. I think this could be useful for other OTP users as well.
This PR will serialize FeedInfo objects from GTFS feeds into the OTP graph, and expose them via a new call
/otp/routers/default/index/feeds/{feedId}in IndexAPI. If the given feed ID does not exist, or that feed does not supplyfeed_info.txt, the call will return a 404 (though of course I'm open to feedback on this behavior).