StopTimetable-Request (Aushangfahrplan)
Stellt den Aushangfahrplan einer Linie an einer Haltestelle bereit.
Endpoint
- Pfad:
XML_STOPTIMETABLE_REQUEST
- Methode: GET
Parameter (Auszug)
Parameter | Typ | Beschreibung |
---|---|---|
stopId | string | Haltestellen-ID |
lineId | string | Linie/Variante |
date | string | Datum YYYYMMDD (optional) |
Beispiel-Request
GET /XML_STOPTIMETABLE_REQUEST?stopId=de:05513:1001&lineId=VRR:196:A
1
Antwort (Beispiel)
json
{
"timetable": {
"weekday": [["05:12","05:32"],["06:02","06:22"]],
"saturday": [],
"sunday": []
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
JavaScript-Beispiel
js
async function getStopTimetable(stopId, lineId) {
const base = 'https://server:port/virtuellesVerzeichnis/XML_STOPTIMETABLE_REQUEST'
const usp = new URLSearchParams({ stopId, lineId })
const res = await fetch(`${base}?${usp}`)
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.json()
}
1
2
3
4
5
6
7
2
3
4
5
6
7
title: StopTimetable-Request (Aushangfahrplan) outline: deep
StopTimetable-Request
Gibt den Aushangfahrplan einer Linie an einer Haltestelle zurück.
Endpoint
- Pfad:
XML_STOPTIMETABLE_REQUEST
- Methode: GET
Parameter (Auszug)
Parameter | Typ | Beschreibung |
---|---|---|
stopId | string | Haltestellen-ID |
lineId | string | Linien-ID/Bezeichnung |
directionId | string | Richtung/Endpunkt |
date | string | Datum YYYYMMDD oder dayType |
dayType | string | Optional: weekday , sat , sun |
Beispiel-Request
GET /XML_STOPTIMETABLE_REQUEST?stopId=de:05513:1001&lineId=196&directionId=K&dayType=weekday
1
Antwort (Beispiel)
json
{
"timetable": [
{ "hour": 8, "minutes": ["05", "22", "38", "50"] },
{ "hour": 9, "minutes": ["10", "30", "50"] }
]
}
1
2
3
4
5
6
2
3
4
5
6
JavaScript-Beispiel
js
async function getStopTimetable(stopId, lineId, directionId, opts = {}) {
const base = 'https://server:port/virtuellesVerzeichnis/XML_STOPTIMETABLE_REQUEST'
const usp = new URLSearchParams({ stopId, lineId, directionId })
if (opts.date) usp.set('date', opts.date)
if (opts.dayType) usp.set('dayType', opts.dayType)
const res = await fetch(`${base}?${usp}`)
if (!res.ok) throw new Error('HTTP ' + res.status)
return res.json()
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9