mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 16:16:32 +02:00 
			
		
		
		
	| .. | ||
| base.json | ||
| example.js | ||
| index.js | ||
| products.js | ||
| readme.md | ||
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 journeylegs
- 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'
	}
}