db-vendo-client/p
2021-03-26 01:10:28 +01:00
..
avv add AVV profile 2021-01-26 22:26:36 +01:00
bart add BART profile 2021-01-26 22:26:36 +01:00
bvg add todos 2020-03-18 21:45:30 +01:00
cfl docs: remove "migrating to 4" guide, fix profile examples, minor tweaks 📝 2021-01-10 20:53:37 +01:00
cmta profile flag for lines() 2020-11-28 11:25:43 +01:00
db Enable usage of 1st class BahnCards and fix typo 2021-03-25 13:05:10 +01:00
db-busradar-nrw profile flag for lines() 2020-11-28 11:25:43 +01:00
hvv HVV: disable lines() 🐛 2020-11-28 11:40:51 +01:00
insa profile flag for remarks() 2020-11-28 11:25:43 +01:00
invg profile flag for remarks() 2020-11-28 11:25:43 +01:00
irish-rail add Irish Rail profile 2020-09-23 10:36:17 +02:00
mobil-nrw mobil.nrw refreshJourneys(): use outReconL[] instead of ctxRecon 🐛 2021-01-19 12:38:43 +01:00
mobiliteit-lu mobiliteit.lu: fix national-train product bitmasks 🐛 2020-12-27 02:00:44 +01:00
nahsh profile flag for remarks() 2020-11-28 11:25:43 +01:00
nvv profile flag for remarks() 2020-11-28 11:25:43 +01:00
oebb ÖBB: change ver to 1.33 🐛, enable remarks(), update client info 2021-02-12 23:47:10 +01:00
pkp profile flag for remarks() 2020-11-28 11:25:43 +01:00
rejseplanen Rejseplanen profile 2020-09-15 11:36:24 +02:00
rmv profile flag for remarks() 2020-11-28 11:25:43 +01:00
rsag minor fixes 2020-11-15 14:18:25 +01:00
saarfahrplan adapt profiles to ctx-based parse fns 2020-01-05 18:10:09 +01:00
sbahn-muenchen S-Bahn Munich: switch to 1.21 protocol 2020-09-15 11:36:24 +02:00
sbb add SBB profile 2020-12-26 21:54:04 +01:00
sncb profile flag for remarks() 2020-11-28 11:25:43 +01:00
svv add SVV profile 2020-04-09 14:33:58 +02:00
vbb profile flag for remarks() 2020-11-28 11:25:43 +01:00
vbn add VBN profile 2020-03-12 18:59:17 +01:00
vkg VKG, VVT departures(): disable getPasslist & stbFltrEquiv 🐛 2021-02-07 22:22:15 +01:00
vmt profile flag for remarks() 2020-11-28 11:25:43 +01:00
vos add VOS profile 2021-01-26 22:26:35 +01:00
vrn add VRN profile 2020-11-26 23:29:21 +01:00
vsn soothe the linter: remove unused variables 2020-02-27 17:10:03 +01:00
vvt VKG, VVT departures(): disable getPasslist & stbFltrEquiv 🐛 2021-02-07 22:22:15 +01:00
zvv add ZVV profile 2020-07-31 12:14:22 +02:00
readme.md Mark profile name as code 2021-03-26 01:10:28 +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
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
Salzburg public transport (SVV) - docs example svv
Verkehrsverbund Tirol (VVT) - docs example vvt
Kärntner Linien/Verkehrsverbund Kärnten (VKG/VVK) - docs example vkg
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')