Philipp Partosch 46a936d7de added all files to project | 2 years ago | |
---|---|---|
.. | ||
avv | 2 years ago | |
bart | 2 years ago | |
bls | 2 years ago | |
bvg | 2 years ago | |
cfl | 2 years ago | |
cmta | 2 years ago | |
dart | 2 years ago | |
db | 2 years ago | |
db-busradar-nrw | 2 years ago | |
hvv | 2 years ago | |
insa | 2 years ago | |
invg | 2 years ago | |
irish-rail | 2 years ago | |
ivb | 2 years ago | |
mobil-nrw | 2 years ago | |
mobiliteit-lu | 2 years ago | |
nahsh | 2 years ago | |
nvv | 2 years ago | |
oebb | 2 years ago | |
ooevv | 2 years ago | |
pkp | 2 years ago | |
rejseplanen | 2 years ago | |
rmv | 2 years ago | |
rsag | 2 years ago | |
saarfahrplan | 2 years ago | |
salzburg | 2 years ago | |
sbahn-muenchen | 2 years ago | |
sbb | 2 years ago | |
sncb | 2 years ago | |
stv | 2 years ago | |
svv | 2 years ago | |
tpg | 2 years ago | |
vbb | 2 years ago | |
vbn | 2 years ago | |
vkg | 2 years ago | |
vmt | 2 years ago | |
vor | 2 years ago | |
vos | 2 years ago | |
vrn | 2 years ago | |
vsn | 2 years ago | |
vvt | 2 years ago | |
vvv | 2 years ago | |
zvv | 2 years ago | |
readme.md | 2 years ago |
hafas-client
profilesThis 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
).
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
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
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')