changelog, related libs 📝, clean up code

This commit is contained in:
Jannis R 2018-07-16 11:35:47 +02:00
parent 12e61bea0a
commit e6130d7c23
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
6 changed files with 6 additions and 5 deletions

View file

@ -13,6 +13,8 @@ This version is not fully backwords-compatible. Check out [the migration guide](
- 84bce0c `arrivals()`/`departures()`: parse & expose platforms - 84bce0c `arrivals()`/`departures()`: parse & expose platforms
- 85e0bdf `journeys()`: `startWithWalking` option with default `true` - 85e0bdf `journeys()`: `startWithWalking` option with default `true`
- f6ae29c journey legs with `type: 'walking'` now have a `distance` in meters - 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` - 1551943 `arrivals()`/`departures()`: `includeRelatedStations` option with default `true`
### breaking changes 💥 ### breaking changes 💥

View file

@ -262,7 +262,7 @@ client.journeys(hbf, heinrichHeineStr)
}) })
}) })
.then((laterJourneys) => { .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) console.log('departure of first (later) journey', firstJourney.legs[0].departure)
}) })
.catch(console.error) .catch(console.error)

View file

@ -328,7 +328,7 @@ const createClient = (profile, request = _request) => {
} }
opt = Object.assign({ opt = Object.assign({
stopovers: true, // return stations on the way? stopovers: true, // return stations on the way?
polyline: false, polyline: false, // return a track shape?
remarks: true // parse & expose hints & warnings? remarks: true // parse & expose hints & warnings?
}, opt) }, opt)
opt.when = new Date(opt.when || Date.now()) opt.when = new Date(opt.when || Date.now())

View file

@ -1,7 +1,7 @@
'use strict' 'use strict'
const createParseMovement = (profile, opt, data) => { 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.dirGeo? maybe the speed?
// todo: what is m.stopL? // todo: what is m.stopL?

View file

@ -2,7 +2,6 @@
const findRemark = require('./find-remark') const findRemark = require('./find-remark')
// todo: arrivalDelay, departureDelay or only delay ?
const createParseStopover = (profile, opt, data, date) => { const createParseStopover = (profile, opt, data, date) => {
const {locations, lines, hints, warnings} = data const {locations, lines, hints, warnings} = data

View file

@ -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-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-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-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-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-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-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. - [`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) - [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) - [Collection of european transport JavaScript modules.](https://github.com/public-transport/european-transport-modules)