Skip to content

Feat: Translink API#151

Merged
jbriones1 merged 28 commits into
mainfrom
feat_140_translink
Jun 30, 2026
Merged

Feat: Translink API#151
jbriones1 merged 28 commits into
mainfrom
feat_140_translink

Conversation

@jbriones1

Copy link
Copy Markdown
Contributor

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
  • Added unit tests that mock the data

jbriones1 added 28 commits June 7, 2026 12:15
* 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
@jbriones1 jbriones1 merged commit 70ae1c1 into main Jun 30, 2026
3 checks passed
@jbriones1 jbriones1 deleted the feat_140_translink branch June 30, 2026 08:51
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.

TransLink REST API support

1 participant