hafas-client icon indicating copy to clipboard operation
hafas-client copied to clipboard

clean up the API

Open derhuerst opened this issue 5 years ago • 20 comments

  • [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 into dep.trip & dep.trip.linedep.line.id/arr.line.id & dep.line.fahrtNr/arr.line.fahrtNr don't make sense. id (as it currently is) and fahrtNr 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 to journey.id~~

derhuerst avatar Aug 22 '18 17:08 derhuerst

  • [x] leg.mode = 'walking' implies that leg.mode always contains the mode of the line of the leg, but it doesn't. – 02c95ff

derhuerst avatar Sep 02 '18 17:09 derhuerst

  • [x] rename leg.id to leg.tripId – 8e0b334

derhuerst avatar Sep 02 '18 17:09 derhuerst

  • [x] remove ~~or rename~~ line.productCode – 8dd4ef5
  • [x] remove ~~or rename~~ line.class – 8dd4ef5

derhuerst avatar Sep 03 '18 14:09 derhuerst

  • [x] rename station(id) to stop(id) – 94fb64d

derhuerst avatar Sep 17 '18 12:09 derhuerst

  • [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

derhuerst avatar Sep 24 '18 14:09 derhuerst

  • [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

derhuerst avatar Sep 25 '18 18:09 derhuerst

  • [x] profiles: rename nationalExp -> nationalExpress – c13138c

derhuerst avatar Oct 08 '18 18:10 derhuerst

  • [x] formerScheduled{Arrival|Departure}Platform -> scheduled{Arrival|Departure}Platform – 969c045

derhuerst avatar Oct 13 '18 10:10 derhuerst

  • [x] movement.nextStops -> movement.nextStopovers – b4d763f

derhuerst avatar Oct 25 '18 22:10 derhuerst

  • [x] remove movement.trip ~~movement.trip -> movement.fahrtNr~~ – 1269773

derhuerst avatar Oct 25 '18 22:10 derhuerst

  • [ ] leg.mode (from FPTF) vs leg.line.mode
  • [ ] leg.public (from FPTF) vs leg.line.public
  • [ ] leg.operator (from FPTF) vs leg.line.operator

derhuerst avatar Oct 26 '18 10:10 derhuerst

  • [x] locations: rename opt.stations to opt.stops

derhuerst avatar Nov 12 '18 13:11 derhuerst

  • [x] ~~rename profile.formatStation/profile.parseStation -> profile.formatStop/profile.parseStop~~

derhuerst avatar Nov 21 '18 18:11 derhuerst

  • [x] rename opt.stationLines -> opt.linesOfStops

derhuerst avatar Nov 21 '18 18:11 derhuerst

  • [x] ~~trip.line.fahrtNr -> trip.fahrtNr, leg.line.fahrtNr -> leg.fahrtNr~~
  • [ ] add trip.name to differentiate it from trip.line.name

derhuerst avatar Jun 21 '19 16:06 derhuerst

  • [ ] movement.location -> movement.position

derhuerst avatar Dec 10 '19 20:12 derhuerst

  • [ ] move profile = {...defaultProfile, ...profile} from index.js/throttle.js/retry.js to p/*/index.js

derhuerst avatar Jan 14 '20 22:01 derhuerst

  • [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

derhuerst avatar Feb 11 '20 15:02 derhuerst

  • [ ] #194

derhuerst avatar Oct 20 '20 00:10 derhuerst

  • [ ] https://github.com/public-transport/hafas-client/issues/217

derhuerst avatar Jan 09 '24 22:01 derhuerst