diff --git a/docs/changelog.md b/docs/changelog.md index 2fcbe9ea..3eee4338 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,6 +13,8 @@ This version is not fully backwords-compatible. Check out [the migration guide]( - 84bce0c `arrivals()`/`departures()`: parse & expose platforms - 85e0bdf `journeys()`: `startWithWalking` option with default `true` - f6ae29c journey legs with `type: 'walking'` now have a `distance` in meters +- 0d5a8fa departures, arrivals, stopovers: former scheduled platform(s) +- 0199749 `language` option with default `en` - 1551943 `arrivals()`/`departures()`: `includeRelatedStations` option with default `true` ### breaking changes 💥 diff --git a/docs/journeys.md b/docs/journeys.md index 9cabaeda..ccddad55 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -262,7 +262,7 @@ client.journeys(hbf, heinrichHeineStr) }) }) .then((laterJourneys) => { - const firstJourney = laterourneys[laterJourneys.length - 1] + const firstJourney = laterJourneys[laterJourneys.length - 1] console.log('departure of first (later) journey', firstJourney.legs[0].departure) }) .catch(console.error) diff --git a/index.js b/index.js index 5175cdd0..62aa7b6a 100644 --- a/index.js +++ b/index.js @@ -328,7 +328,7 @@ const createClient = (profile, request = _request) => { } opt = Object.assign({ stopovers: true, // return stations on the way? - polyline: false, + polyline: false, // return a track shape? remarks: true // parse & expose hints & warnings? }, opt) opt.when = new Date(opt.when || Date.now()) diff --git a/parse/movement.js b/parse/movement.js index 81166d1d..c51513a3 100644 --- a/parse/movement.js +++ b/parse/movement.js @@ -1,7 +1,7 @@ 'use strict' const createParseMovement = (profile, opt, data) => { - const {locations, lines, hints, warnings, polylines} = data + const {locations, lines, polylines} = data // todo: what is m.dirGeo? maybe the speed? // todo: what is m.stopL? diff --git a/parse/stopover.js b/parse/stopover.js index 25fc2b46..8c97acdd 100644 --- a/parse/stopover.js +++ b/parse/stopover.js @@ -2,7 +2,6 @@ const findRemark = require('./find-remark') -// todo: arrivalDelay, departureDelay or only delay ? const createParseStopover = (profile, opt, data, date) => { const {locations, lines, hints, warnings} = data diff --git a/readme.md b/readme.md index c7129099..a74d03ab 100644 --- a/readme.md +++ b/readme.md @@ -178,10 +178,10 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript - [`hafas-departures-in-direction`](https://github.com/derhuerst/hafas-departures-in-direction#hafas-departures-in-direction) – Pass in a HAFAS client, get departures in a certain direction. - [`hafas-collect-departures-at`](https://github.com/derhuerst/hafas-collect-departures-at#hafas-collect-departures-at) – Utility to collect departures, using any HAFAS client. - [`hafas-monitor-departures`](https://github.com/derhuerst/hafas-monitor-departures#hafas-monitor-departures) – Pass in a HAFAS client, fetch all departures at any set of stations. -- [`hafas-departures-in-direction`](https://github.com/derhuerst/hafas-departures-in-direction#hafas-departures-in-direction) – Pass in a HAFAS client, get departures in a certain direction. - [`hafas-discover-stations`](https://github.com/derhuerst/hafas-discover-stations#hafas-discover-stations) – Pass in a HAFAS client, discover stations by querying departures. - [`hafas-record-delays`](https://github.com/derhuerst/hafas-record-delays#hafas-record-delays) – Record delays from hafas-monitor-departures into a LevelDB. - [`hafas-estimate-station-weight`](https://github.com/derhuerst/hafas-estimate-station-weight#hafas-estimate-station-weight) – Pass in a HAFAS client, estimate the importance of a station. +- [`hafas-client-rpc`](https://github.com/derhuerst/hafas-client-rpc) – Make JSON-RPC calls to `hafas-client` via WebSockets. - [`hafas-rest-api`](https://github.com/derhuerst/hafas-rest-api#hafas-rest-api) – Expose a HAFAS client via an HTTP REST API. - [List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.](https://github.com/public-transport/european-transport-operators) - [Collection of european transport JavaScript modules.](https://github.com/public-transport/european-transport-modules)