Closed pjattke closed 6 years ago
General explanation: vbb-rest
just responds with the data returned by hafas-client
. I didn't duplicate documentation about the response format because I would quickly forget to update the other if I changed one of them. This is why you currently need to read the hafas-client
docs as well. I think that this is a suboptimal solution though.
Specific explanation: As mentioned in the docs for require('hafas-client').journeys()
, each journey
leg has an id
field, which you can pass into /journeys/legs/:ref
. It basically works like the docs for require('hafas-client').journeyLeg(ref)
.
please reopen if you still have a question regarding this.
The example of section
GET /journeys/legs/:ref
in the documentation states # this won't work, get a new ref from /journeys first. But I cannot see a ref in the received data ofGET /journeys
.However, the
GET /stations/:id/departures
gives me ajourneyID
which looks quite similar to the expected ref string.Is that just a mistake in the documentation or am I doing something wrong?