Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vbb-client

derhuerst23ISCdeprecated4.0.0

Obsolete. Use the hafas-rest-api-client package instead.

An API client for Berlin & Brandenburg public transport.

vbb, bvg, public, transport, berlin

readme

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.

architecture

npm version ISC-licensed gitter channel support me on Patreon

Installing

npm install vbb-client

Usage

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:

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.