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

departures: throw if duration is above supported maximum

Open derhuerst opened this issue 6 years ago • 1 comments

From https://github.com/derhuerst/compute-db-station-weight/blob/dda148fa533d7497b5d24737d2d1246407719aa9/index.js#L42-L43

Apparently, the DB API does not support querying departures for 1440 min (1 day) at once.

Throw if the passed value is above to prevent implementations from implicitly relying on this gotcha.

@juliuste do you know the limit for ÖBB?

derhuerst avatar Jan 19 '18 18:01 derhuerst

This does not change the task of the issue but some up-to-date observations: For both DB and ÖBB I see exactly 1440 min as the limit (I did use hafas-client for my requests). Requests with a higher duration do not get any more trips.

fnorf avatar Feb 12 '20 20:02 fnorf