vbb-client v4.0.0
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-clientUsage
const vbb = require('vbb-client')()
vbb.journeys('900000003201', '900000024101', {results: 1})
.then(console.log)
.catch(console.error)With Custom Endpoint
const vbb = require('vbb-client')({
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/allasallStations([query])→Promise/stations/nearbyasnearby([query])→Promise/stations/:idasstation(id, [query])→Promise/stations/:id/departuresasdepartures(id, [query])→Promise/lines?query=…aslines([query])→stream.Readable/lines/:idasline(id, [query])→Promise/journeysasjourneys(from, to, [query])→Promise/journeys/legs/:refasjourneyLeg(ref, [query])→Promise/maps/:typeasmap(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.
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago