mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-11-02 17:16:31 +02:00
- hafas.station() -> hafas.stop() 🐛
- put stop IDs into variables
- .then/.catch -> async/await
- consistent order of methods
- minor reformatting for readability
|
||
|---|---|---|
| .. | ||
| base.json | ||
| example.js | ||
| index.js | ||
| products.js | ||
| readme.md | ||
S-Bahn München profile for hafas-client
S-Bahn München runs commuter trains in Munich. This profile adapts hafas-client to their HAFAS endpoint.
Usage
import {createClient} from 'hafas-client'
import {profile as sMuenchenProfile} from 'hafas-client/p/sbahn-muenchen/index.js'
const userAgent = 'link-to-your-project-or-email' // adapt this to your project!
// create a client with S-Bahn München profile
const client = createClient(sMuenchenProfile, userAgent)