mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-10-23 21:26:33 +03:00
| .. | ||
| base.json | ||
| example.js | ||
| index.js | ||
| products.js | ||
| readme.md | ||
SBB profile for hafas-client
Schweizerische Bundesbahnen (SBB) is the largest Swiss long-distance public transport company. This profile adds SBB-specific customizations to hafas-client.
Usage
const createClient = require('hafas-client')
const sbbProfile = require('hafas-client/p/sbb')
// create a client with SBB profile
const client = createClient(sbbProfile, 'my-awesome-program')
By default, the de_CH locale is being used. You can customize it using withLocale():
// create a client with SBB profile and fr_CH locale
const client = createClient(sbbProfile.withLocale('fr_CH'), 'my-awesome-program')