db-vendo-client/p
2022-10-24 17:29:23 +02:00
..
avv re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
bart re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
bls add BLS profile 📝 2021-07-26 17:45:09 +02:00
bvg BVG/VBB: parse stop DHIDs 2022-04-26 22:08:23 +02:00
cfl CFL, Irish Rail: transformReqBody -> defaultLanguage 2022-06-18 18:33:26 +02:00
cmta re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
dart add DART profile 📝 2021-09-13 14:19:08 +02:00
db DB: support age group by age API 2022-04-26 12:13:52 +02:00
db-busradar-nrw update profile examples 📝 2021-05-01 10:58:45 +02:00
hvv re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
insa update profile examples 📝 2021-05-01 10:58:45 +02:00
invg update profile examples 📝 2021-05-01 10:58:45 +02:00
irish-rail CFL, Irish Rail: transformReqBody -> defaultLanguage 2022-06-18 18:33:26 +02:00
ivb add IVB profile 📝 2021-08-05 20:10:10 +02:00
kvb KVB: provide CA certificate chain via Agent 🐛 2022-06-18 18:33:13 +02:00
mobil-nrw update profile examples 📝 2021-05-01 10:58:45 +02:00
mobiliteit-lu update profile examples 📝 2021-05-01 10:58:45 +02:00
nahsh update profile examples 📝 2021-05-01 10:58:45 +02:00
nvv minor tweaks 📝 2021-10-26 15:00:09 +02:00
oebb ÖBB: enable lines() 2021-12-02 13:57:03 +01:00
ooevv add OÖVV profile 📝 2021-08-05 20:10:32 +02:00
pkp re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
rejseplanen re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
rmv re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
rsag update profile examples 📝 2021-05-01 10:58:45 +02:00
saarfahrplan re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
salzburg add Land Salzburg profile 📝 2021-08-05 20:11:01 +02:00
sbahn-muenchen re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
sbb update profile examples 📝 2021-05-01 10:58:45 +02:00
sncb minor tweaks 📝 2022-01-13 14:08:43 +01:00
stv add STV profile 📝 2021-08-05 20:10:22 +02:00
svv update profile examples 📝 2021-05-01 10:58:45 +02:00
tpg add TPG profile 📝 2021-07-28 22:45:43 +02:00
vbb put todos 2022-10-24 17:29:23 +02:00
vbn update profile examples 📝 2021-05-01 10:58:45 +02:00
vkg re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
vmt update profile examples 📝 2021-05-01 10:58:45 +02:00
vor add VOR profile 📝 2021-08-05 20:10:42 +02:00
vos re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
vrn minor tweaks 📝 2021-10-26 15:00:09 +02:00
vsn update profile examples 📝 2021-05-01 10:58:45 +02:00
vvt re-upgrade profiles, adapt feature flags, adapt tests 2021-05-01 10:58:45 +02:00
vvv add VVV profile 📝 2021-08-05 20:09:58 +02:00
zvv update profile examples 📝 2021-05-01 10:58:45 +02:00
readme.md add KVB profile 📝 2021-11-27 23:46:27 +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
Swiss Railways (SBB) - docs example sbb
Polskie Koleje Państwowe (PKP) pkp-hafas docs example pkp
Belgian National Railways (SNCB/NMBS) - docs example sncb
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
Hamburg public transport (HVV) - docs example hvv
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:

const createClient = require('hafas-client')

const myCustomProfile = {
	// …
}

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

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