mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-10-26 13:46:33 +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 | ||
| digicert-sha2-secure-server-ca.crt.pem | ||
| example.js | ||
| index.js | ||
| products.js | ||
| readme.md | ||
SNCB profile for hafas-client
Note: This profile is currently broken because SNCB has switched the HAFAS API style and we haven't migrated to the new API.
Société nationale des chemins de fer belges (SNCB)/Nationale Maatschappij der Belgische Spoorwegen (NMBS) is the major public transport provider of Belgium. This profile adds SNCB-specific customizations to hafas-client.
Usage
import {createClient} from 'hafas-client'
import {profile as sncbProfile} from 'hafas-client/p/sncb/index.js'
const userAgent = 'link-to-your-project-or-email' // adapt this to your project!
// create a client with SNCB profile
const client = createClient(sncbProfile, userAgent)
Customisations
- parses SNCB-specific products