Closed grote closed 9 years ago
I'll provide for the first point a fix early January, thanks.
What is the expected behavior for earlier and later trips?
It's basically paging. If you request 4 trips and then request a later 4 trips you should get the same 8 trips you would have gotten if you requested 8 trips to begin with. (Of course if you operate on dynamic data, it can happen that the query for next yields more recent data than you would have gotten at the time of the first call.)
One difference between the various implementations is that some return really only the next trips, and some will repeat everything that was queried already and add the next trips. Öffi tries to accomodate for that, but I suspect there's still bugs lurking. As a rule of thumb, return whatever you get from the server.
@schildbach I had set the requested trip count to 1 for testing purposes, but I realised that now navitia returns only one trip unless specified otherwise. Should I take the default trip count for the navitia provider, or hardcode some value?
AbstractNetworkProvider has the "numTripsRequested" property. That's the value you should use. Currently the default is set to 6. If Navitia for some reason should have a lower default, it might make sense to refactor the code to allow the service provider pick a default.
@grote Could you retest please?
I'm getting 6 trips now like expected. Thanks for the fix!
I queried a couple of trips and there's usually only one trip returned while all the other providers return at least 3 trips.
Also, querying for earlier or later trips does not work for me, at least not the same way it does for other providers.
This is probably for @aelkhour.