mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
adapt docs to 005f3f8
📝
This commit is contained in:
parent
fe8f9c29f9
commit
2430a74414
1 changed files with 5 additions and 22 deletions
|
@ -187,24 +187,7 @@ The response may look like this:
|
||||||
arrival: '2017-12-17T19:17:00.000+01:00',
|
arrival: '2017-12-17T19:17:00.000+01:00',
|
||||||
departure: '2017-12-17T19:17:00.000+01:00'
|
departure: '2017-12-17T19:17:00.000+01:00'
|
||||||
} ]
|
} ]
|
||||||
} ],
|
} ]
|
||||||
origin: {
|
|
||||||
type: 'station',
|
|
||||||
id: '900000003201',
|
|
||||||
name: 'S+U Berlin Hauptbahnhof',
|
|
||||||
location: { /* … */ },
|
|
||||||
products: { /* … */ }
|
|
||||||
},
|
|
||||||
departure: '2017-12-17T19:07:00.000+01:00',
|
|
||||||
destination: {
|
|
||||||
type: 'station',
|
|
||||||
id: '900000024101',
|
|
||||||
name: 'S Charlottenburg',
|
|
||||||
location: { /* … */ },
|
|
||||||
products: { /* … */ }
|
|
||||||
},
|
|
||||||
arrival: '2017-12-17T19:47:00.000+01:00',
|
|
||||||
arrivalDelay: 30
|
|
||||||
},
|
},
|
||||||
earlierRef: '…', // use with the `earlierThan` option
|
earlierRef: '…', // use with the `earlierThan` option
|
||||||
laterRef: '…' // use with the `laterThan` option
|
laterRef: '…' // use with the `laterThan` option
|
||||||
|
@ -259,16 +242,16 @@ const heinrichHeineStr = '900000100008'
|
||||||
client.journeys(hbf, heinrichHeineStr)
|
client.journeys(hbf, heinrichHeineStr)
|
||||||
.then((journeys) => {
|
.then((journeys) => {
|
||||||
const lastJourney = journeys[journeys.length - 1]
|
const lastJourney = journeys[journeys.length - 1]
|
||||||
console.log('departure of last journey', lastJourney.departure)
|
console.log('departure of last journey', lastJourney.legs[0].departure)
|
||||||
|
|
||||||
// get later journeys
|
// get later journeys
|
||||||
return client.journeys(hbf, heinrichHeineStr, {
|
return client.journeys(hbf, heinrichHeineStr, {
|
||||||
laterThan: journeys.laterRef
|
laterThan: journeys.laterRef
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then((laterourneys) => {
|
.then((laterJourneys) => {
|
||||||
const firstJourney = laterourneys[laterourneys.length - 1]
|
const firstJourney = laterourneys[laterJourneys.length - 1]
|
||||||
console.log('departure of first (later) journey', firstJourney.departure)
|
console.log('departure of first (later) journey', firstJourney.legs[0].departure)
|
||||||
})
|
})
|
||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue