db-vendo-client/p
2023-04-04 11:33:24 +02:00
..
avv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
bart docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
bls docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
bvg docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
cfl docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
cmta docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
dart docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
db DB: use ver 1.16 for stop() requests 🐛, update integration test fixture 2023-04-04 11:33:24 +02:00
db-busradar-nrw docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
insa docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
invg docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
irish-rail docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
ivb docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
kvb docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
mobil-nrw docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
mobiliteit-lu docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
nahsh docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
nvv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
oebb docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
ooevv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
pkp docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
rejseplanen docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
rmv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
rsag docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
saarfahrplan docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
salzburg docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
sbahn-muenchen docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
sncb docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
stv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
svv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
tpg docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vbb docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vbn docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vkg docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vmt docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vor docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vos docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vrn docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vsn docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vvt docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
vvv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
zvv docs: make user agent instructions more specific & actionable 📝 2023-03-14 20:58:17 +01:00
readme.md SNCB/NMBS: document profile as broken 📝, skip E2E/integration tests 2023-02-10 11:42:05 +01:00

hafas-client profiles

This directory contains specific customisations for each endpoint, called profiles. They parse data from the API differently, add additional information, or add special methods specific to the endpoint (such as journeysFromTrip).

built-in profiles

There are built-in profiles for these public transportation networks:

HAFAS endpoint wrapper library docs example code profile name
Deutsche Bahn (DB) db-hafas docs example db
Polskie Koleje Państwowe (PKP) pkp-hafas docs example pkp
Belgian National Railways (SNCB/NMBS) - docs example sncb (currently broken)
Iarnród Éireann (Irish Rail) - docs example irish-rail
Berlin & Brandenburg public transport (VBB) vbb-hafas docs example vbb
Berlin public transport (BVG) bvg-hafas docs example bvg
Österreichische Bundesbahnen (ÖBB) oebb-hafas docs example oebb
Mobilitéitszentral (Luxembourg) - docs example mobiliteit-lu
Bay Area Rapid Transit (BART) - docs example bart
Des Moines Area Rapid Transit (DART) - docs example dart
Nahverkehr Sachsen-Anhalt (NASA)/INSA insa-hafas docs example insa
Nahverkehrsverbund Schleswig-Holstein (NAH.SH) nahsh-hafas docs example nahsh
Rhein-Main-Verkehrsverbund (RMV) - docs example rmv
Austin, Texas (CMTA/CapMetro) - docs example cmta
S-Bahn München - docs example sbahn-muenchen
Saarfahrplan/VGS (Saarland) - docs example saarfahrplan
Société Nationale des Chemins de Fer Luxembourgeois (CFL) - docs example cfl
Nordhessischer Verkehrsverbund (NVV) (Hesse) - docs example nvv
mobil.nrw - docs example mobil-nrw
DB Busradar NRW (DB Regio Bus) - docs example db-busradar-nrw
Verkehrsverbund Süd-Niedersachsen (VSN) - docs example vsn
Ingolstädter Verkehrsgesellschaft (INVG) - docs example invg
Verkehrsverbund Bremen/Niedersachsen (VBN) - docs example vbn
Verkehrsverbund Rhein-Neckar (VRN) - docs example vrn
Rostocker Straßenbahn AG (RSAG) - docs example rsag
Verkehrsverbund Mittelthüringen (VMT) - docs example vmt
Verkehrsgemeinschaft Osnabrück (VOS) - docs example vos
Aachener Verkehrsverbund (AVV) - docs example avv
Kölner Verkehrs-Betriebe (KVB) - docs example kvb
Rejseplanen in Denmark - docs example rejseplanen
Innsbrucker Verkehrsbetriebe (IVB) - docs example ivb
Oberösterreichischer Verkehrsverbund (OÖVV) - docs example ooevv
Salzburg - docs example salzburg
Steirischer Verkehrsverbund (STV) - docs example stv
Salzburger Verkehrsverbund (SVV) - docs example svv
Verkehrsverbund Tirol (VVT) - docs example vvt
Verkehrsverbund Ost-Region (VOR) - docs example vor
Kärntner Linien/Verkehrsverbund Kärnten (VKG/VVK) - docs example vkg
Verkehrsverbund Vorarlberg (VVV) - docs example vvv
Transports publics genevois (TPG) (Geneva) - docs example tpg
BLS AG (Bern) - docs example bls
Zürich public transport (ZVV) - docs example zvv

writing your own

If you want to write a profile for an endpoint, check out the writing a profile guide.

Your profile must be passed into createClient and is expected to be in a certain structure:

import {createClient} from 'hafas-client'

const myCustomProfile = {
	// …
}

// create a client with the profile
const client = createClient(myCustomProfile)

// use it to query data
await client.journeys('1234', '2345')