-
Notifications
You must be signed in to change notification settings - Fork 9
StopAreaCode
Terry Bommels edited this page Dec 7, 2015
·
4 revisions
A StopArea is a collection of nearby TimingPoints with the same name, when a travelers speaks about a bus stop or trainstation he will usually refer to the stoparea. A StopAreaCode is a string with a maximum of 10 characters.
-
GET /stopareacode/
will return all the stoparea's processed within the up-time of the API. StopAreaCodes in this list are all request-able via the requests below. Further metadata such as the position, name, town and it's stopareacode is returned.
{
"SpBern": {
"Latitude": 51.5194853,
"TimingPointName": "Spoordonk, Bernadettestraat",
"StopAreaCode": "SpBern",
"Longitude": 5.2689131,
"TimingPointTown": "Spoordonk"
},
"TbGeW": {
"Latitude": 51.5446781,
"TimingPointName": "Tilburg, Gen.Winkelmanstraat",
"StopAreaCode": "TbGeW",
"Longitude": 5.0600486,
"TimingPointTown": "Tilburg"
},
"GvEend": {
"Latitude": 52.0655072,
"TimingPointName": "Den Haag, Eendenplein",
"StopAreaCode": "GvEend",
"Longitude": 4.4107878,
"TimingPointTown": "Den Haag"
},
}
-
GET /stopareacode/$stopareacode
will return all the timingpoints and passes along them in the stoparea. -
GET /stopareacode/$stopareacode/departures
will return all the timingpoints and departures in the stoparea.
{
"schns": {
"57330620": {
"Passes": { }
},
"57332108": {
"Passes": { }
},
"57332107": {
"Passes": { }
},
"57330221": {
"Passes": { }
},
"57330224": {
"Passes": { }
},
"57330630": {
"Passes": { }
}
}
}
- Returned are 0 or more passes along this stopareacode. Note that the field DestinationName50, LineName, TargetDepartureTime, TargetArrivalTime, LinePublicNumber, ProductFormulaType are optional as they are depending on static timetable information from Koppelvlak7.
- HTTP error 404 indicates that the server doesn't recognize the stopareacode.
-
GET /stopareacode/$stopareacodecode1,$stopareacode2,$stopareacode3,..
requests multiple stoparea's in one request by putting them in a comma separated list. This is the preferred way to keep the server workload as low as possible.
{
"schns": {
"57330620": { },
"57332108": { },
"57332107": { },
"57330221": { },
"57330224": { },
"57330630": { }
},
"schndz": {
"57330640": { },
"57330720": { },
"57330150": { },
"57330140": { }
}
}