hafas-client
hafas-client copied to clipboard
clean up the API
- [x] remove
departure.trip
&movement.trip
– They have a confusing name and may not even be the trip nr all the time. – 1269773 - [ ] ~~split
departure.line
intodep.trip
&dep.trip.line
–dep.line.id
/arr.line.id
&dep.line.fahrtNr
/arr.line.fahrtNr
don't make sense.id
(as it currently is) andfahrtNr
are properties of the trip/vehicle, not the line.~~ - [x] addresses have an ID too – find a way to differentiate them from POIs – #42
- [ ] ~~rename
journey.refreshToken
tojourney.id
~~
- [x]
leg.mode = 'walking'
implies thatleg.mode
always contains the mode of the line of the leg, but it doesn't. – 02c95ff
- [x] rename
leg.id
toleg.tripId
– 8e0b334
- [x] remove ~~or rename~~
line.productCode
– 8dd4ef5 - [x] remove ~~or rename~~
line.class
– 8dd4ef5
- [x] rename
station(id)
tostop(id)
– 94fb64d
- [x] ~~
parseFormat
/formatDate
/formatTime
:(profile, ...) => {}
->(profile) => (...) => {}
~~- https://github.com/public-transport/hafas-client/blob/129caa704f3dd5c4b8e9dd7d74c18033a357e9b7/format/time.js#L7
- https://github.com/public-transport/hafas-client/blob/129caa704f3dd5c4b8e9dd7d74c18033a357e9b7/parse/date-time.js#L7
- https://github.com/public-transport/hafas-client/blob/129caa704f3dd5c4b8e9dd7d74c18033a357e9b7/format/date.js#L7
- [x] remove
profile.journeysNumF
(51f4a66) – ~~ÖBB needs it.~~- https://github.com/public-transport/hafas-client/blob/129caa704f3dd5c4b8e9dd7d74c18033a357e9b7/index.js#L172-L177
- https://github.com/public-transport/hafas-client/blob/129caa704f3dd5c4b8e9dd7d74c18033a357e9b7/index.js#L225
- [x] profiles: rename
nationalExp
->nationalExpress
– c13138c
- [x]
formerScheduled{Arrival|Departure}Platform
->scheduled{Arrival|Departure}Platform
– 969c045
- [x]
movement.nextStops
->movement.nextStopovers
– b4d763f
- [x] remove
movement.trip
~~movement.trip
->movement.fahrtNr
~~ – 1269773
- [ ]
leg.mode
(from FPTF) vsleg.line.mode
- [ ]
leg.public
(from FPTF) vsleg.line.public
- [ ]
leg.operator
(from FPTF) vsleg.line.operator
- [x]
locations
: renameopt.stations
toopt.stops
- [x] ~~rename
profile.formatStation
/profile.parseStation
->profile.formatStop
/profile.parseStop
~~
- [x] rename
opt.stationLines
->opt.linesOfStops
- [x] ~~
trip.line.fahrtNr
->trip.fahrtNr
,leg.line.fahrtNr
->leg.fahrtNr
~~ - [ ] add
trip.name
to differentiate it fromtrip.line.name
- [ ]
movement.location
->movement.position
- [ ] move
profile = {...defaultProfile, ...profile}
fromindex.js
/throttle.js
/retry.js
top/*/index.js
- [x] https://github.com/public-transport/hafas-client/blob/d2bca32c770184b965ae26bbd7cc84aae01dacbb/parse/warning.js#L17
- [x] https://github.com/public-transport/hafas-client/blob/d2bca32c770184b965ae26bbd7cc84aae01dacbb/parse/warning.js#L25
- [ ] #194
- [ ] https://github.com/public-transport/hafas-client/issues/217