public-transport / hafas-client

JavaScript client for HAFAS public transport APIs.
ISC License
278 stars 54 forks source link

journeys(): support multiple via points #254

Open yu-re-ka opened 2 years ago

yu-re-ka commented 2 years ago

I don't know the api format needed for this, but it should be possible to enter multiple via points

derhuerst commented 2 years ago

We could change the code to handle opt.via being an array. This is the current implementation:

https://github.com/public-transport/hafas-client/blob/9c10a1765fbc737c58b4bbed237a22394a0cf0fb/index.js#L144

fightforlife commented 2 years ago

should multiple via points in an array handled as AND (the journey has to go through all via points) or OR (Journeys can go through either point)

derhuerst commented 2 years ago

Note sure! Do we know if HAFAS supports both? Would be great if someone could investigate this!