[iRail] iRail API - Actionscript 3 wrapper

Joris Timmerman joris.timmerman at gmail.com
Fri Aug 6 22:25:20 UTC 2010

Just to be correct, my mail translated in English (sorry, wasn't aware of
the international aspect of the mailinglist)


I explained the concept of an API to someone and used the iRail API as an
I build a wrapper to explain how things work, and tonight I worked that
example out to a full wrapper of Pieter's API.
(wrappers lower the the threshold for developers to use the API, I've
noticed this myself, especially in the Flash community, as an author of a
wrapper for Google's webservices, because there are a lot of people with not
much experience or not much time, and when offered a wrapper, they're more
eager to dig in).
The full source is (was) included as an attachment.

On testing, I stumbled on something piculiar, one of the suggested routes
was a bus.
Feature or bug?
(There is actually nothing wrong on this line beween 2 neighbouring cities,
it may be that the hours of the bus were closer to the inputted time )

date: Fri Aug 6 20:40:00 GMT+0200 2010
station: TORHOUT
duration: 25 minutes (0:25)
delay: 1
date: Fri Aug 6 20:51:00 GMT+0200 2010
trains:BUS 74

Further I have a few (API-)feature requests

   - A way to find a station by an input, such as Google Suggest with a few
   limited results, for auto-completion for example. (indeed this can be done
   with the full list, but I was suggesting this to avoid traffic to download
   the full list)
   - A stationslist ordered hierarchally, structered by zone (with a zone I
   mean a set of stations in one city). -> drop that, Pieter got a very good
   - Possibllity to pass on to the API if the given date & time is arrival
   or departure time.
   - ADDED: Possibllity to pass on the means of travel in the API, (for
   example: trains only, trains and busses, ...) (I would suggest to use an
   index, for example: -1 is all, 0 is only trains,...)

I'll keep you posted!
Love the good work.

2010/8/6 Pieter Colpaert <pieter.colpaert at gmail.com>

> Hi Joris,
> as this is an international project, can you speak English instead of
> Dutch please?
> The rest of my answers are written between the lines of your mail:
> On Fri, 2010-08-06 at 21:31 +0200, Joris Timmerman wrote:
> >
> > Net even het concept API uitgelegd en een voorbeeld uitgewerkt.
> > Om hem dat uit te leggen heb ik een Actionscript 3 API
> > (Flash/Flex/AIR) wrapper gebouwd op Pieter zijn API.
> > Heb dat vanavond verder uitgewerkt.
> > Volledige source/build/documentation zit in bijlage.
> Cool! All wrappers are welcome of course! Do you want us to feature it?
> > Verder nog iets raars ontdekt tijdens het testen, namelijk een bus
> > tussen mijn train results. :)
> > Feature of bug? :p
> >
> >
> > date: Fri Aug 6 20:40:00 GMT+0200 2010
> > station: TORHOUT
> > duration: 25 minutes (0:25)
> > delay: 1
> > date: Fri Aug 6 20:51:00 GMT+0200 2010
> > station: LICHTERVELDE
> > trains:BUS 74
> I think Jan Vansteenlandt answered this one correctly: if there are no
> trains for a reason it will return a bus. I don't think this is a bad
> feature. Do you?
> > Verder nog een 3-tal (API)-feature requests:
> >       * Een manier om een station te zoeken aan de hand van een input,
> >         zoals Google Suggest, met een beperkt aantal mogelijke
> >         resultaten, voor eventuele auto-complete functionaliteit.
> >       * De stations lijst, in zo verre mogelijk, structureren in
> >         zones, bvb Gent of Brussel.
> >       * Mogelijkheid om bij schedulen de aangegeven tijd te markeren
> >         als aankomst tijd of vertrektijd
> >
> The first feature request is as far as I know not an API problem. The
> API can return you a list of all stations, if you want to implement
> auto-completion you should implement that using the list of stations you
> downloaded once.
> What's the point of structuring the XML file in zones? Not sorting them
> alphabetically will not allow someone to use binary search, which will
> slow down the processing on the mobile device.
> Your third feature request is one that I will implement asap. You can
> expect api.irail.be to contain this feature Monday.
> Thanks for your input!
> Pieter
> _______________________________________________
> iRail mailing list
> iRail at list.irail.be
> http://lists.rootspirit.com/mailman/listinfo/irail

Joris Timmerman
joris.timmerman at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/irail/attachments/20100807/0f5804fb/attachment-0003.html>

More information about the iRail mailing list