document /journeys/:ref & /trips/:id 📝
This commit is contained in:
parent
84ea402437
commit
835bec4e18
1 changed files with 39 additions and 0 deletions
|
@ -10,6 +10,8 @@
|
||||||
- [`GET /stations`](#get-stations)
|
- [`GET /stations`](#get-stations)
|
||||||
- [`GET /stations/:id/departures`](#get-stationsiddepartures)
|
- [`GET /stations/:id/departures`](#get-stationsiddepartures)
|
||||||
- [`GET /journeys`](#get-journeys)
|
- [`GET /journeys`](#get-journeys)
|
||||||
|
- [`GET /journeys/:ref`](#get-journeysref)
|
||||||
|
- [`GET /trips/:id`](#get-tripsid)
|
||||||
- [`GET /locations`](#get-locations)
|
- [`GET /locations`](#get-locations)
|
||||||
|
|
||||||
## `GET /stations?query=…`
|
## `GET /stations?query=…`
|
||||||
|
@ -150,6 +152,43 @@ curl 'https://2.db.transport.rest/journeys?from=…&to=…&results=3&bus=false&t
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## `GET /journeys/:ref`
|
||||||
|
|
||||||
|
Output from [`hafas.refreshJourney(…)`](https://github.com/public-transport/hafas-client/blob/4/docs/refresh-journey.md).
|
||||||
|
|
||||||
|
- `stopovers`: Return stations on the way? Default: `true`.
|
||||||
|
- `polylines`: Return shape of each journey leg? Default: `false`.
|
||||||
|
- `remarks`: Parse & expose hints & warnings? Default: `true`.
|
||||||
|
- `language`: Language of the results. Default: `en`.
|
||||||
|
|
||||||
|
`Content-Type`: `application/json`
|
||||||
|
|
||||||
|
### examples
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl 'https://2.db.transport.rest/journeys/%C2%B6HKI%C2%B6T%24A%3D1%40O%3DBerlin%20Hbf%20(tief)%40L%3D8098160%40a%3D128%40%24A%3D1%40O%3DHamburg%20Hbf%40L%3D8002549%40a%3D128%40%24201910062138%24201910062333%24ICE%20%20502%24%241%24%C2%A7T%24A%3D1%40O%3DHamburg%20Hbf%40L%3D8002549%40a%3D128%40%24A%3D1%40O%3DMannheim%20Hbf%40L%3D8000244%40a%3D128%40%24201910062345%24201910070625%24ICE%201271%24%241%24%C2%A7T%24A%3D1%40O%3DMannheim%20Hbf%40L%3D8000244%40a%3D128%40%24A%3D1%40O%3DStuttgart%20Hbf%40L%3D8000096%40a%3D128%40%24201910070629%24201910070707%24ICE%20%20991%24%241%24%C2%A7T%24A%3D1%40O%3DStuttgart%20Hbf%40L%3D8000096%40a%3D128%40%24A%3D1%40O%3DT%C3%BCbingen%20Hbf%40L%3D8000141%40a%3D128%40%24201910070722%24201910070823%24RE%2022011%24%241%24%0A'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## `GET /trips/:id`
|
||||||
|
|
||||||
|
Output from [`hafas.trip(…)`](https://github.com/public-transport/hafas-client/blob/4/docs/trip.md).
|
||||||
|
|
||||||
|
- `lineName`: **Required.** Line name of the part's mode of transport, e.g. `RE 7`.
|
||||||
|
- `stopovers`: Return stations on the way? Default: `true`.
|
||||||
|
- `remarks`: Parse & expose hints & warnings? Default: `true`.
|
||||||
|
- `polyline`: Return a shape for the trip? Default: `false`.
|
||||||
|
- `language`: Language of the results. Default: `en`.
|
||||||
|
|
||||||
|
`Content-Type`: `application/json`
|
||||||
|
|
||||||
|
### examples
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl 'https://your-api-endpoint/trips/1|229086|0|80|6102019?lineName=ICE+993'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## `GET /locations`
|
## `GET /locations`
|
||||||
|
|
||||||
Output from [`require('db-hafas').locations(…)`](https://github.com/derhuerst/db-hafas/blob/master/docs/locations.md)
|
Output from [`require('db-hafas').locations(…)`](https://github.com/derhuerst/db-hafas/blob/master/docs/locations.md)
|
||||||
|
|
Loading…
Reference in a new issue