• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / next-departures-api / 25460597244 / 1
28%
main: 28%

Build:
Build:
LAST BUILD BRANCH: chore/update-go-deps
DEFAULT BRANCH: main
Ran 06 May 2026 08:55PM UTC
Files 19
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 May 2026 08:54PM UTC coverage: 28.253% (+0.2%) from 28.031%
25460597244.1

Pull #14

github

rm-hull
feat: add Traveline fallback for SIRI rate limits

Implement a fallback mechanism to fetch bus departures from Traveline
when the primary SIRI API exceeds its usage limits. This ensures service
availability even after the daily TransportAPI quota is exhausted.

-   Introduces `FallbackManager` to track rate-limit state.
-   Adds `TravelineClient` to scrape live departures from the Traveline
    website.
-   Includes a daily **CRON** job to reset the fallback state at
    midnight.
-   Updates `NextDepartures` route to automatically switch providers.

```mermaid
sequenceDiagram
    participant User
    participant API as API Server
    participant SIRI as SIRI API
    participant FM as Fallback Manager
    participant TVL as Traveline

    User->>API: GET /v1/next-departures/:id
    API->>FM: IsSiriRateLimited?
    alt No
        API->>SIRI: Request departures
        alt Success
            SIRI-->>API: Departure data
        else Rate Limited (429/403)
            SIRI-->>API: Limit Exceeded
            API->>FM: SetSiriRateLimited(true)
            API->>TVL: Scrape departures
            TVL-->>API: Fallback data
        end
    else Yes
        API->>TVL: Scrape departures
        TVL-->>API: Fallback data
    end
    API-->>User: JSON Response
```
Pull Request #14: feat: add Traveline fallback for SIRI rate limits

317 of 1122 relevant lines covered (28.25%)

0.31 hits per line

Source Files on job 25460597244.1
  • Tree
  • List 19
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25460597244
  • a02362d2 on github
  • Prev Job for on feat/scrape-traveline (#25457852195.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc