db-vendo-client/p/readme.md
Jannis R 8ba60dcf92
improve readme.md & p/readme.md 📝
- more list of profiles to p/readme.md
- explain related libs better
- tweak readme.md section for better readability

[ci skip]
2021-01-28 14:22:29 +01:00

7.2 KiB

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 source code
Deutsche Bahn (DB) db-hafas docs example src
Swiss Railways (SBB) - docs example src
Polskie Koleje Państwowe (PKP) pkp-hafas docs example src
Belgian National Railways (SNCB/NMBS) - docs example src
Iarnród Éireann (Irish Rail) - docs example src
Berlin & Brandenburg public transport (VBB) vbb-hafas docs example src
Berlin public transport (BVG) bvg-hafas docs example src
Österreichische Bundesbahnen (ÖBB) oebb-hafas docs example src
Mobilitéitszentral (Luxembourg) - docs example src
Bay Area Rapid Transit (BART) docs example src
Nahverkehr Sachsen-Anhalt (NASA)/INSA insa-hafas docs example src
Nahverkehrsverbund Schleswig-Holstein (NAH.SH) nahsh-hafas docs example src
Rhein-Main-Verkehrsverbund (RMV) - docs example src
Austin, Texas (CMTA/CapMetro) - docs example src
S-Bahn München - docs example src
Saarfahrplan/VGS (Saarland) - docs example src
Société Nationale des Chemins de Fer Luxembourgeois (CFL) - docs example src
Hamburg public transport (HVV) - docs example src
Nordhessischer Verkehrsverbund (NVV) (Hesse) - docs example src
mobil.nrw - docs example src
DB Busradar NRW (DB Regio Bus) - docs example src
Verkehrsverbund Süd-Niedersachsen (VSN) - docs example src
Ingolstädter Verkehrsgesellschaft (INVG) - docs example src
Verkehrsverbund Bremen/Niedersachsen (VBN) - docs example src
Verkehrsverbund Rhein-Neckar (VRN) - docs example src
Rostocker Straßenbahn AG (RSAG) - docs example src
Verkehrsverbund Mittelthüringen (VMT) - docs example src
Verkehrsgemeinschaft Osnabrück (VOS) - docs example src
Aachener Verkehrsverbund (AVV) - docs example src
Salzburg public transport (SVV) - docs example src
Verkehrsverbund Tirol (VVT) - docs example src
Kärntner Linien/Verkehrsverbund Kärnten (VKG/VVK) - docs example src
Zürich public transport (ZVV) - docs example src

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')