mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
adapt examples to e1bdd56 📝
This commit is contained in:
parent
ab5ca3db8b
commit
a187f8ee97
4 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ client.journeys('008010226', '008013456', {results: 1})
|
|||
|
||||
// .then(([journey]) => {
|
||||
// const leg = journey.legs[0]
|
||||
// return client.journeyLeg(leg.id, leg.line.name)
|
||||
// return client.trip(leg.id, leg.line.name)
|
||||
// })
|
||||
|
||||
.then(data => {
|
||||
|
|
|
@ -9,7 +9,7 @@ const client = createClient(nahshProfile)
|
|||
client.journeys('8000103', '8000199', {results: 10, tickets: true})
|
||||
// client.departures('8000199', {duration: 10})
|
||||
// client.arrivals('8000199', {duration: 5, stationLines: true})
|
||||
// client.journeyLeg('1|30161|5|100|14032018', 'Bus 52')
|
||||
// client.trip('1|30161|5|100|14032018', 'Bus 52')
|
||||
// client.locations('Schleswig', {results: 1})
|
||||
// client.station('706990') // Kiel Holunderbusch
|
||||
// client.nearby({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Profiles
|
||||
|
||||
This directory contains specific customisations for each endpoint, called *profiles*. They **parse data from the API differently, add additional information, or enable non-default methods** (such as [`journeyLeg`](../docs/journey-leg.md)) if they are supported.
|
||||
This directory contains specific customisations for each endpoint, called *profiles*. They **parse data from the API differently, add additional information, or enable non-default methods** (such as [`trip`](../docs/trip.md)) if they are supported.
|
||||
|
||||
Each profile has it's own directory. It will be passed into `hafas-client` and is expected to be in a certain structure:
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
|
|||
|
||||
// .then(([journey]) => {
|
||||
// const leg = journey.legs[0]
|
||||
// return client.journeyLeg(leg.id, leg.line.name, {polyline: true})
|
||||
// return client.trip(leg.id, leg.line.name, {polyline: true})
|
||||
// })
|
||||
.then((data) => {
|
||||
console.log(require('util').inspect(data, {depth: null}))
|
||||
|
|
Loading…
Add table
Reference in a new issue