[iRail] API Issue with Rhode Saint genese in connection & Liveboard

Christophe Versieux christophe.versieux at gmail.com
Sun Aug 14 18:03:01 UTC 2011


Pieter,

This is something really strange from the API.
Imagine a foreign (chinese, american, african, etc..) user of any 
application.
He will of course use iRail or BeTrains because belgian people told him 
that NMBS sucks at information.

The facts are

     * The application should provide a list where he can pick the 
station name with both dutch & french versions (Rhode saint genese and 
sint genesius rhode is quite easy, but something like Doornik/Tournai is 
not intuitive when you are on the plateform, because that's kinda 
impossible to translate.)
     * The API request will use lan=en because I want neutral names to 
be returned (Bussels-South)

-> Seem currently impossible, and bad results will be returned....

I can live with that and hardcode stations numbers, but maybe that 
feature request should be written in the TODO list.



> 	Pieter Colpaert <mailto:pieter.colpaert at gmail.com>
> 11 août 2011 12:05
>
>
> Hi Christophe,
>
> I'm sorry to notice that it's not easy to fix this. Since you are not
> adding a language parameter, we have to guess the language inside the
> API. We do this by sending the name to the NMBS and by asking what they
> think of it. They try to return the best option as possible.
>
> If you try this: http://api.irail.be/liveboard/?station=sint%20genesius%
> 20rode&lang=nl
>
> or http://api.irail.be/liveboard/?station=saint%20rhode%20genese&lang=fr
>
> It works like a charm.
>
> If you want you can add a hardfix to the API by changing it in the
> php-code but I think it's better to always add a language parameter?
>
> Yours sincerely,
>
> Pieter
>
> ------------------------------------------------------------------------
>
> 	Christophe Versieux <mailto:christophe.versieux at gmail.com>
> 11 août 2011 11:27
>
>
> Hello,
>
> I already reported an issue with Rhode saint genese liveboard: 
> http://api.irail.be/liveboard/?station=rhode%20saint%20genese
> That returns results from "De Hoek"
>
> Seem that the connection is also broken for this city!
>
> http://api.irail.be/connections/?to=rhode%20saint%20genese&from=tournai <http://api.irail.be/connections/?to=rhode%20saint%20genese&from=tournai>
> <errorcode="502">
> Could not get data. Please report this problem to iRail at list.iRail.be.
> </error>
>
> ------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/irail/attachments/20110814/635fae90/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1086 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/irail/attachments/20110814/635fae90/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/irail/attachments/20110814/635fae90/attachment-0007.jpg>


More information about the iRail mailing list