Skip to content

feat: hosted clients for PATH, NJ Transit rail, NYC Ferry, Citi Bike, LIRR, Metro-North (2.4.0) - #12

Merged
gtokman merged 1 commit into
mainfrom
devin/1793543346-regional-providers
Nov 1, 2026
Merged

gtokman merged 1 commit into
mainfrom
devin/1793543346-regional-providers

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds SDK namespaces for the regional providers mtaapi.dev already serves, so the docs can show SDK code instead of curl. All of them go through the existing hostedJson (same auth headers and missing-apiKey error). Response types follow docs/openapi.json in mta-api.

const mta = new MTA({ apiKey: process.env.MTA_API_KEY })
await mta.path.arrivals({ station: "JSQ", direction: "to-ny" })
await mta.njTransit.rail.departures({ station: "NY", limit: 10 })
await mta.nycFerry.arrivals({ stop: "Wall St/Pier 11" })
await mta.citiBike.stations({ lat: 40.6923, lon: -73.9874, minBikes: 5, ebike: true })
await mta.lirr.departures({ stop: "Penn Station", route: "1", limit: 5 })
await mta.metroNorth.departures({ stop: "Grand Central" })

lirr and metroNorth share one CommuterRailClient with different base paths. Path params (route, Citi Bike id) are URL-encoded.

Bumps the version to 2.4.0. Publishing still needs a v2.4.0 tag after merge (publish.yml). The mta-api docs PR says "Requires mta-js 2.4.0", so publish before that one merges.

bun test index.test.ts (22 pass) and bun run typecheck pass. Hosted integration tests were added but not run locally because no MTA_API_KEY was set.

Link to Devin session: https://app.devin.ai/sessions/0c4a45aeae754724bd092a6abc7e1004
Open in Devin Desktop: https://app.devin.ai/desktop/session/0c4a45aeae754724bd092a6abc7e1004?variant=devin
Requested by: @[REDACTED SECRET]

… LIRR, Metro-North

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@gtokman
gtokman merged commit 6995871 into main Nov 1, 2026
5 checks passed
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.

1 participant