From 0daa1c5fef931ede502b129f2e4b1dc510beb3d7 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 21 Nov 2018 23:56:39 +0100 Subject: [PATCH] adapt docs & examples to 96ff59d :memo: --- docs/journeys.md | 2 +- docs/trip.md | 4 ++-- p/bvg/example.js | 2 +- p/cmta/example.js | 2 +- p/insa/example.js | 2 +- p/sbahn-muenchen/example.js | 2 +- p/vbb/example.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/journeys.md b/docs/journeys.md index 84615f81..651b5922 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -101,7 +101,7 @@ The response may look like this: [ { legs: [ { - id: '1|32615|6|86|10072018', + tripId: '1|32615|6|86|10072018', origin: { type: 'station', id: '900000003201', diff --git a/docs/trip.md b/docs/trip.md index 755b47a8..6de4a798 100644 --- a/docs/trip.md +++ b/docs/trip.md @@ -4,7 +4,7 @@ This method can be used to refetch information about a trip – a vehicle stopp *Note*: This method is not supported by every profile/endpoint. -Let's say you used [`journeys`](journeys.md) and now want to get more up-to-date data about the arrival/departure of a leg. You'd pass in the trip ID from `leg.id`, e.g. `'1|24983|22|86|18062017'`, and the name of the line from `leg.line.name` like this: +Let's say you used [`journeys`](journeys.md) and now want to get more up-to-date data about the arrival/departure of a leg. You'd pass in the trip ID from `leg.tripId`, e.g. `'1|24983|22|86|18062017'`, and the name of the line from `leg.line.name` like this: ```js const createClient = require('hafas-client') @@ -16,7 +16,7 @@ const client = createClient(vbbProfile, 'my-awesome-program') client.journeys('900000003201', '900000100008', {results: 1}) .then(([journey]) => { const leg = journey.legs[0] - return client.trip(leg.id, leg.line.name) + return client.trip(leg.tripId, leg.line.name) }) .then(console.log) .catch(console.error) diff --git a/p/bvg/example.js b/p/bvg/example.js index 779a7e1b..bc54e6b6 100644 --- a/p/bvg/example.js +++ b/p/bvg/example.js @@ -34,7 +34,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // .then(([journey]) => { // const leg = journey.legs[0] -// return client.trip(leg.id, leg.line.name, {polyline: true}) +// return client.trip(leg.tripId, leg.line.name, {polyline: true}) // }) // .then(([journey]) => { diff --git a/p/cmta/example.js b/p/cmta/example.js index dfce9e9a..b88288ae 100644 --- a/p/cmta/example.js +++ b/p/cmta/example.js @@ -34,7 +34,7 @@ client.journeys('000002370', '000005919', {results: 1, polylines: true}) // .then(([journey]) => { // const leg = journey.legs[0] -// return client.trip(leg.id, leg.line.name, {polyline: true}) +// return client.trip(leg.tripId, leg.line.name, {polyline: true}) // }) // .then(([journey]) => { // return client.refreshJourney(journey.refreshToken, {stopovers: true, remarks: true}) diff --git a/p/insa/example.js b/p/insa/example.js index 4901dcc5..4ee13095 100644 --- a/p/insa/example.js +++ b/p/insa/example.js @@ -26,7 +26,7 @@ client.journeys('008010226', '008013456', {results: 1}) // .then(([journey]) => { // const leg = journey.legs[0] -// return client.trip(leg.id, leg.line.name) +// return client.trip(leg.tripId, leg.line.name) // }) // .then(([journey]) => { diff --git a/p/sbahn-muenchen/example.js b/p/sbahn-muenchen/example.js index d6bb46d2..fd0155f4 100644 --- a/p/sbahn-muenchen/example.js +++ b/p/sbahn-muenchen/example.js @@ -34,7 +34,7 @@ client.departures('8004154', {duration: 5}) // .then(([journey]) => { // const leg = journey.legs.find(leg => leg.line) -// return client.trip(leg.id, leg.line.name, {polyline: true}) +// return client.trip(leg.tripId, leg.line.name, {polyline: true}) // }) // .then(([journey]) => { diff --git a/p/vbb/example.js b/p/vbb/example.js index 779a7e1b..bc54e6b6 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -34,7 +34,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // .then(([journey]) => { // const leg = journey.legs[0] -// return client.trip(leg.id, leg.line.name, {polyline: true}) +// return client.trip(leg.tripId, leg.line.name, {polyline: true}) // }) // .then(([journey]) => {