Closed Nils-Magnus closed 4 years ago
related: #40, derhuerst/bvg-rest#6
example 'https://3.vbb.transport.rest/stops?query=jungfernheide' example 'https://3.vbb.transport.rest/stops?query=mehrigndamm&fuzzy=true' example 'https://3.vbb.transport.rest/stops?weight=9120&coordinates.latitude=52.493575' example 'https://3.vbb.transport.rest/stops/all' example 'https://3.vbb.transport.rest/stops/nearby?latitude=52.52725&longitude=13.4123' example 'https://3.vbb.transport.rest/stops/900000013102' example 'https://3.vbb.transport.rest/stops/900000013102/departures?direction=900000014101' example 'https://3.vbb.transport.rest/stops/900000013102/departures?when=tomorrow%206pm&results=3'
Can you try /stations
for each of these?
Ah, that helped a lot. Most request worked out now, except:
https://3.vbb.transport.rest/stations?weight=9120&coordinates.latitude=52.493575 --> returns an empty response
Accessing https://3.vbb.transport.rest/stations/nearby?latitude=52.52725&longitude=13.4123:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /stations/nearby</pre>
</body>
</html>
(but this worked actually with stops
).
Is there BTW somewhere a slightly more detailed description of the attributes available? I did some reverse engineering on /stops/nearby
for example: So distance
is obviously the calculated distance (presumably as the crow flies) in (probably) meters and has to be < 10,000, right?
https://3.vbb.transport.rest/stations?weight=9120&coordinates.latitude=52.493575 --> returns an empty response
Yeah, the example is a bit bad: There are currently no stations with a weight of 9120
and a latitude of 52.493575
, as the data constantly changes. I changed it.
Please reopen if you encounter additional issues related to this.
FYI I have set up v5.vbb.transport.rest
, which has slightly more intuitive route names and documentation.
Some examples from the example page break. Maybe the API has changed?
For testing I used this script: