Feat: Translink API#151
Merged
Merged
Conversation
* Pulls out all the stops for all bus information in the SFU bus loop
* returns the schedule grouped by route_id and sorted based on departure time * by default returns the next 3 departures
Combines static schedule data with the realtime data to indicate if something is going on with the next 3 departures.
* When interacting with the application for anything other than Pytest the `main` database will be used * Logging when running tests has been suppressed
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.
closes #140
Description
Endpoints that pull data from TransLink's GTFS API. Focused on the buses that begin their journey at the upper bus loop/Univercity: R5, 143, 144, and 145. Caches responses to ensure we don't go over on API usage. Static schedule is cached once a day, but is updated once a week by TransLink. This is to ensure we are always up to date on the static schedule, case they release an emergency one or change their release date.
Features
Adds the following endpoints.
/translink/realtime: returns realtime bus information/translink/static: returns the static schedule of the bus routes, which is created from the schedule TransLink produces once a week/translink/schedule: returns a bus departure times, based on mixing the realtime and static data, using realtime data first