smurfy / fahrplan

QT Application for Public transportation
GNU General Public License v2.0
58 stars 33 forks source link

Symbian - PTV (Victoria, Australia) searches not working #250

Open The-Kitchen-Sink opened 7 years ago

The-Kitchen-Sink commented 7 years ago

Searches using the PTV http://ptv.vic.gov.au/ provider do not appear to be working in the 2.0.28 Version of fahrplan - (the earlier version didnt work either but i noticed applist had an update and updated to see if that would fix the problem)

any search ends up with a "no results found" error and while typing in new station names no autocomplete results appear either.

Im running Fahrplan on a Nokia E7-00 Belle Refresh - 111.040.1511 and have tested using both cellular data and a wifi connection (and can see the phone bringing the wifi connection up prior to attempting to search)

(Thank you btw for creating the App - its far better than trying to get the ptv website to search on my E7)

smurfy commented 7 years ago

Thanks for the report, i will have a look

leppa commented 7 years ago

Looks like API endpoint (http://jp.ptv.vic.gov.au/ptv/) is no longer there. Either we have to find a correct one, or we can only remove the service.

The-Kitchen-Sink commented 7 years ago

edit: While im no coder i decided to have a look at the source of Fahrplan anyway looks like its not using the PTV supplied api but is passing queries straight to the journey planner itself (so my original comment should probably be ignored however ive kept it below for histories sake)

the journey planned now lives here https://www.ptv.vic.gov.au/journey

however i cant figure out how to get it to accept the sample queries in the parser_efa.cpp source file (even after i tweak the urls)

-- Old comment which should be ignored regarding the official api --

Seems they have got a new version of the API out V3.0 replacing V2.3

https://www.ptv.vic.gov.au/about-ptv/ptv-data-and-reports/digital-products/ptv-timetable-api/

A migration guide is here

https://static.ptv.vic.gov.au/PTV/PTV%20docs/API/1476929813/PTV-Timetable-API-V2-to-V3-migration-guide.PDF

and the full API info is available via the main page but does contain this info

You can access the PTV Timetable API through a HTTP or HTTPS interface, as follows:

base URL / version number / API name / query string The base URL is either: http://timetableapi.ptv.vic.gov.au or https://timetableapi.ptv.vic.gov.au

so it looks like they have moved a bunch of things around

smurfy commented 7 years ago

The old endpoint uses the EFA api. It seems the new journey planner still uses it (the request params are still the EFA names) But as we use EFA XML we need to check if we still can get XML responses.

If this fails, we probably need to switch to the official api.

Edit: Looks like EFA is out: https://github.com/schildbach/public-transport-enabler/commit/dee663ea54d818b2d58d22cf4d16c54746e4aa5b