mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
2.1 KiB
2.1 KiB
Migrating to hafas-client@3
If you use the journeys()
or journeyLeg()
methods…
- …instead of
journey.departure
, usejourney.legs[0].departure
.005f3f8
- …instead of
journey.arrival
, usejourney.legs[last].arrival
.005f3f8
- …rename
opt.passedStations
toopt.stopovers
.ebe4fa6
- …rename
leg.journeyId
toleg.tripId
. 2e6aefe - …rename
leg.passed
toleg.stopovers
.6611f26
- …rename
leg.stopovers[].station
toleg.stopovers[].stop
.3e672ee
If you use the journeys()
method and opt.when
…
…use opt.departure
instead. Use opt.arrival
to get journeys arriving before the specified date+time. This replaces the opt.when
& opt.whenRepresents
options from hafas-client@2
. c82ad23
If you use the journeys()
and opt.polylines
or journeyLeg()
and opt.polyline
…
…leg.polyline
will be parsed for you now.
If you use the departures()
method…
…rename departure.journeyId
to departure.tripId
. 2e6aefe
If you use the location()
method…
…change the location(id)
call to station(id)
. 665bed9
If you use the radar()
method…
- …change the
radar(north, west, south, east)
call toradar({north, west, south, east})
.40b559f
- …rename
movement.journeyId
tomovement.tripId
. 2e6aefe
If you use hafas-client
with a custom profile…
…write your profile in the new format. Then, you can pass it into hafas-client
just like before. #32/b7c1ee3
If you use hafas-client
with custom parse functions…
…change the following parsers to the parse…(profile, opt, data)
signature. 8881d8a/b6fbaa5
parseDeparture
parseJourney
parseJourneyLeg
parseLine
parseMovement
parseLocation
parseNearby
parsePolyline
parseStopover
If you use station.lines
array anywhere…
…add the stationLines: true
option to the method call, e.g. `hafas.departures('123', {stationLines: true}). cabe5fa