db-vendo-client/p/bvg
2022-11-17 15:17:01 +01:00
..
base.json update transport-apis; BVG: update endpoint & aid 2021-12-29 15:20:04 +01:00
example.js minor tweaks 📝 2022-01-13 14:08:43 +01:00
index.js BVG: don't convert IDs 💥 2022-11-17 15:17:01 +01:00
products.js BVG profile 2018-07-29 20:17:50 +02:00
readme.md BVG: support BerlKönig, docs 📝 2020-01-05 17:50:55 +01:00

BVG profile for hafas-client

Verkehrsverbund Berlin-Brandenburg (BVG) is the major local transport provider in Berlin. This profile adds BVG-specific customizations to hafas-client.

Usage

const createClient = require('hafas-client')
const bvgProfile = require('hafas-client/p/bvg')

// create a client with BVG profile
const client = createClient(bvgProfile, 'my-awesome-program')

Customisations

  • parses BVG-specific products (such as X-Bus)
  • supports BerlKönig journey legs
  • strips parts from station names that are unnecessary in the Berlin context
  • parses line names to give more information (e.g. "Is it an express bus?")
  • renames Ringbahn line names to contain and

BerlKönig

BVG has recently announced a ride-sharing service called BerlKönig. Pass berlkoenig: true into journeys() to get special legs:

{
	mode: 'walking',
	departure: // …
	arrival: // …
	origin: // …
	destination: // …
	line: {
		type: 'line',
		name: 'BerlKönig',
		public: true,
		mode: 'taxi',
		product: 'berlkoenig'
	}
}