vbb-client
A client for the Berlin & Brandenburg public transport API deployed at 2.vbb.transport.rest
. Works both in browsers (using a bundler) and in Node.
Installing
npm install vbb-client
Usage
const vbb = vbb
With Custom Endpoint
const vbb = endpoint: "https://my.local.api"
API
vbb-client
is a client for the vbb-rest API deployed at 2.vbb.transport.rest
. Refer to its API docs for all supported parameters.
It wraps the following routes:
/stations?query=…
asstations([query])
→Promise
/stream.Readable
/stations/all
asallStations([query])
→Promise
/stations/nearby
asnearby([query])
→Promise
/stations/:id
asstation(id, [query])
→Promise
/stations/:id/departures
asdepartures(id, [query])
→Promise
/lines?query=…
aslines([query])
→stream.Readable
/lines/:id
asline(id, [query])
→Promise
/journeys
asjourneys(from, to, [query])
→Promise
/journeys/legs/:ref
asjourneyLeg(ref, [query])
→Promise
/maps/:type
asmap(type, [query])
→stream.Readable
Contributing
If you have a question or have difficulties using vbb-client
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.