danielthepope / trntxt

:steam_locomotive::train::train: A data-friendly UK train times site
https://trntxt.uk
MIT License
36 stars 9 forks source link

Later trains #50

Closed benfoxall closed 2 years ago

benfoxall commented 6 years ago

Is there any way to request a next "page" of departures?

I just tried to use trntxt to find the last train on a route though couldn't do it.

danielthepope commented 6 years ago

Ah sorry Ben! From what I remember the National Rail API can provide another 2 hours of schedules, though I didn't make use of it (it was a separate API call). I'll try to get round to adding this when I find some free time 👍

benfoxall commented 6 years ago

Absolutely no apology necessary; trntxt is awesome exactly way it is :heart:.

I just figured I'd log another use case while I remembered (I ended up using google directions today).

I could take a stab at making the change myself if you wanted?

danielthepope commented 6 years ago

Well, my super busy March has finished now, so I should be able to give it a go this month

danielthepope commented 6 years ago

Right then, trntxt currently has a limit of displaying up to 10 results up to 2 hours in the future.

I had a go with this last night (to get all results within the next 4 hours) and in some cases there were too many results for 1 page!

I'm going to break this down into 2 parts:

danielthepope commented 2 years ago

Looks like I never bothered with paging. I'm now just returning all the results the API can get.