From 2430a74414e763a7e6f46034787deaa6e14a1542 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 23 Mar 2018 21:19:25 +0100 Subject: [PATCH] adapt docs to 005f3f8 :memo: --- docs/journeys.md | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/docs/journeys.md b/docs/journeys.md index 152d408d..e101cbf5 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -187,24 +187,7 @@ The response may look like this: arrival: '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 laterRef: '…' // use with the `laterThan` option @@ -259,16 +242,16 @@ const heinrichHeineStr = '900000100008' client.journeys(hbf, heinrichHeineStr) .then((journeys) => { 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 return client.journeys(hbf, heinrichHeineStr, { laterThan: journeys.laterRef }) }) -.then((laterourneys) => { - const firstJourney = laterourneys[laterourneys.length - 1] - console.log('departure of first (later) journey', firstJourney.departure) +.then((laterJourneys) => { + const firstJourney = laterourneys[laterJourneys.length - 1] + console.log('departure of first (later) journey', firstJourney.legs[0].departure) }) .catch(console.error) ```