[iRail] iRail API - Actionscript 3 wrapper

Joris Timmerman joris.timmerman at gmail.com
Sat Aug 7 15:58:16 UTC 2010


Pieter,

Ok, issue has been made.

Thanks!

Joris

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

> Thanks for letting me know. Can you open an issue on the github page for
> this? I'm now doing other stuff and I might forget to generate a new
> list.
>
> Thanks,
> Pieter
>
> On Sat, 2010-08-07 at 17:31 +0200, Joris Timmerman wrote:
> > Pieter,
> >
> >
> > Great!
> > There are a few stations where the location is empty: here is a
> > (generated) list:
> > BERCHEM SAINTE AGATHE
> >
> > BEVEREN
> >
> > BOITSFORT
> >
> > BORGWORM
> >
> > BRAINE L ALLEUD
> >
> > BRAINE LE COMTE
> >
> > BRUGGE ST PIETERS
> >
> > BRUSSEL NAT LUCHTHAVEN
> >
> > BRUXELLES CENTRAL
> >
> > BRUXELLES CHAPELLE
> >
> > BRUXELLES CONGRES
> >
> > BRUXELLES MIDI
> >
> > BRUXELLES NAT AEROPORT
> >
> > BRUXELLES NORD
> >
> > BRUXELLES LUXEMBOURG
> >
> > BRUXELLES SCHUMAN
> >
> > CHATEAU DE SEILLES
> >
> > COMBLAIN LA TOUR
> >
> > COMINES
> >
> > COUR SUR HEURE
> >
> > COURT SAINT ETIENNE
> >
> > DAVE SAINT MARTIN
> >
> > DOORNIK
> >
> > EIGENBRAKEL
> >
> > ENGHIEN
> >
> > FAUX
> >
> > FEXHE LE HAUT CLOCHER
> >
> > FOREST EST
> >
> > FOREST MIDI
> >
> > GENT SINT PIETERS
> >
> > GOUY LEZ PIETON
> >
> > HAL
> >
> > HAM SUR HEURE
> >
> > HAM SUR SAMBRE
> >
> > HAREN SUD
> >
> > HEIST OP DEN BERG
> >
> > HOEI
> >
> > JEMEPPE SUR MEUSE
> >
> > JEMEPPE SUR SAMBRE
> >
> > KAPELLE OP DEN BOS
> >
> > LA ROCHE
> >
> > LOUVAIN LA NEUVE UNIV
> >
> > MARCHE EN FAMENNE
> >
> > MARCHE LES DAMES
> >
> > MARCHE LEZ ECAUSSINNES
> >
> > MARCHIENNE AU PONT
> >
> > MASNUY SAINT PIERRE
> >
> > MONT SAINT GUIBERT
> >
> > MOUSCRON
> >
> > NIJVEL
> >
> > POIX SAINT HUBERT
> >
> > PONT A CELLES
> >
> > PONT DE SERAING
> >
> > SAUVEGARDE
> >
> > SAINT DENIS BOVESSE
> >
> > SAINT JOB
> >
> > SCHAERBEEK
> >
> > 'S GRAVENBRAKEL
> >
> > S'INAAI
> >
> > SINT AGATHA BERCHEM
> >
> > SINT DENIJS BOEKEL
> >
> > SINT GENESIUS RODE
> >
> > SINT GILLIS
> >
> > SINT JORIS WEERT
> >
> > SINT KATELIJNE WAVER
> >
> > SINT MARTENS BODEGEM
> >
> > SOLRE SUR SAMBRE
> >
> > SPA-GERONSTERE
> >
> > TERHULPEN
> >
> > UCCLE CALEVOET
> >
> > UCCLE STALLE
> >
> > VILLERS LA VILLE
> >
> > VOROUX GOREUX
> >
> > WATERMAEL
> >
> > WAVER
> >
> >
> > I looked up the problem, and it seems that it the used keys in
> > coordinates.php are different from the lookup stations names, mostly
> > because of missing dashes like BRUGGE ST PIETERS which is in the
> > coordinates.php written as BRUGGE ST-PIETERS or names in different
> > languages like WAVER, which is in coordinates.php listed as WAVRE.
> >
> >
> > Joris
> >
> >
> > 2010/8/7 Yeri Tiete <yeri at tiete.be>
> >         No ssh access atm. Cant push to main site.
> >         Dev.irail.be gets updated once a hour.
> >         Api at dev.irail.be/api
> >
> >
> >         --
> >         Kind regards,
> >         Yeri Tiete
> >         Sent from my iPhone
> >
> >
> >
> >         On 07 Aug 2010, at 16:22, Pieter Colpaert
> >         <pieter.colpaert at gmail.com> wrote:
> >
> >         > It is already implemented. Check the commits list. Not all
> >         commits are
> >         > immediately pushed to the main site. When there is a new
> >         stable version,
> >         > Yeri will push a lot of commits at once to irail.be
> >         >
> >         > dev.irail.be/api however is refreshed each night at 4 am.
> >         Probably
> >         > you'll find more up to date information on there.
> >         >
> >         > The coordinates are in http://dev.irail.be/api/stations.php
> >         as an
> >         > attribute inside the <station> tag.
> >         >
> >         > Pieter
> >         >
> >         >
> >         > On Sat, 2010-08-07 at 16:17 +0200, Joris Timmerman wrote:
> >         >> Pieter,
> >         >>
> >         >>
> >         >> Could you also implement the stations + coordinates list in
> >         the API as
> >         >> found in /includes/coordinates.php .
> >         >> Very handy when visualizing in an application.
> >         >>
> >         >>
> >         >> Thanks.
> >         >>
> >         >> 2010/8/7 Joris Timmerman <joris.timmerman at gmail.com>
> >         >>        Hi Pieter,
> >         >>
> >         >>
> >         >>        It was in the documentation.
> >         >>        2. Trainschedule
> >         >>        Request:
> >         >>
> >          http://api.irail.be/trains.php?to=STATION1&from=STATION2 |||
> >         >>        OPTIONAL:
> >         &date=01-01-10&time=15:40&results=4&lang=NL
> >         >>
> >         >>
> >         >>
> >         >>
> >         >>
> >         >>        2010/8/7 Pieter Colpaert <pieter.colpaert at gmail.com>
> >         >>                Where did you read about the results
> >         parameter? It's
> >         >>                not in the API
> >         >>                specification anymore.
> >         >>
> >         >>                It's not yet implemented. Might implement it
> >         soon
> >         >>                though.
> >         >>
> >         >>                Pieter
> >         >>
> >         >>
> >         >>                On Sat, 2010-08-07 at 15:39 +0200, Joris
> >         Timmerman
> >         >>                wrote:
> >         >>> Could it be that the results parameter (to indicate
> >         >>                the number of
> >         >>> results returned) doesn't work?
> >         >>> Just checked the PHP code
> >         >>> in
> >         >>
> >          http://github.com/Tuinslak/iRail/blob/master/api/trains.php,
> >         I see
> >         >>> that the variable is stored in $results but never
> >         >>                used again.
> >         >>>
> >         >>> 2010/8/7 Joris Timmerman <joris.timmerman at gmail.com>
> >         >>>        Hi,
> >         >>>
> >         >>>
> >         >>>        Implemented the last 2 features in the
> >         >>                wrapper.
> >         >>>        Let me know where I can commit them to.
> >         >>>        I made an account on Github yesterday,
> >         >>                username: joridor .
> >         >>>
> >         >>>
> >         >>>        2010/8/7 Pieter Colpaert
> >         >>                <pieter.colpaert at gmail.com>
> >         >>>
> >         >>>
> >         >>>                Ok. Fixed and implemented.
> >         >>>
> >         >>>                I've added an option to the API
> >         >>                &trainsonly
> >         >>>                if 1, it will only return trains, if
> >         >>                0 it will also
> >         >>>                return buses and
> >         >>>                such. Default is 0.
> >         >>>
> >         >>>                Wiki page:
> >         >>                http://wiki.github.com/Tuinslak/iRail/api
> >         >>>                Commit:
> >         >>>
> >         >>
> >
> http://github.com/Tuinslak/iRail/commit/cde5e533c4ab22b91e34f2852d2809b26d2899fc
> >         >>>
> >         >>>                The commit will be pushed to
> >         >>                api.irail.be on Monday
> >         >>>                It will be pushed to
> >         >>                dev.irail.be/api tonight (I
> >         >>>                think)
> >         >>>
> >         >>>                Thanks Christophe for your
> >         >>                investigation on the
> >         >>>                product values. (It
> >         >>>                helped ;-) )
> >         >>>
> >         >>>                Pieter
> >         >>>
> >         >>>
> >         >>>                On Sat, 2010-08-07 at 12:21 +0200,
> >         >>                Joris Timmerman
> >         >>>                wrote:
> >         >>>> Hi,
> >         >>>>
> >         >>>> So long as the API gets updated,
> >         >>                I'm willing to keep
> >         >>>                this wrapper up to date.
> >         >>>> I agree with Yeri, I don't have a
> >         >>                subscription for
> >         >>>                busses and the fact I hate busses, I
> >         >>                always set the
> >         >>>                option on the nmbs website for
> >         >>                trains only.
> >         >>>>
> >         >>>>
> >         >>>> Met vriendelijke groet,
> >         >>>> Kind regards,
> >         >>>>
> >         >>>> Joris Timmerman
> >         >>>> Sent from my iPhone
> >         >>>>
> >         >>>> Op 7-aug.-2010 om 01:12 heeft
> >         >>                Pieter Colpaert
> >         >>>                <pieter.colpaert at gmail.com> het
> >         >>                volgende geschreven:
> >         >>>>
> >         >>>>>
> >         >>>>>>
> >         >>>>>> I explained the concept of an
> >         >>                API to someone and
> >         >>>                used the iRail API as
> >         >>>>>> an example.
> >         >>>>>> 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.
> >         >>>>>
> >         >>>>> Thanks, we will feature these
> >         >>                wrappers on our
> >         >>>                website soon. Are you
> >         >>>>> willing to keep it up to date?
> >         >>>>>
> >         >>>>>> On testing, I stumbled on
> >         >>                something piculiar, one
> >         >>>                of the suggested
> >         >>>>>> routes was a bus.
> >         >>>>>> Feature or bug?
> >         >>>>> Feature
> >         >>>>>>
> >         >>>>>>
> >         >>>>>> 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)
> >         >>>>>
> >         >>>>> You should only download the
> >         >>                entire list once, or
> >         >>>                include it in the
> >         >>>>> application. When stations are
> >         >>                added however, you
> >         >>>                might want to update
> >         >>>>> this list. That's why this API
> >         >>                function exists.
> >         >>>>>
> >         >>>>>>     * 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
> >         >>                point
> >         >>>>>
> >         >>>>> Thanks ;-)
> >         >>>>>
> >         >>>>>>     * Possibllity to pass on
> >         >>                to the API if the
> >         >>>                given date & time is
> >         >>>>>>       arrival or departure
> >         >>                time.
> >         >>>>>
> >         >>>>> Fixed and commited:
> >         >>>>>
> >         >>>
> >         >>
> >
> http://github.com/Tuinslak/iRail/commit/5f462523119d8022083b4e710844f743ed99efd3
> >         >>>>>
> >         >>>>> should be on the
> >         >>                http://dev.irail.be/api pretty
> >         >>>                soon now...
> >         >>>>>
> >         >>>>>>     * 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 don't like this idea. I think
> >         >>                buses should be
> >         >>>                included if necessary
> >         >>>>> (as is default). What do others
> >         >>                think of this
> >         >>>                idea?
> >         >>>>>
> >         >>>>> Pieter
> >         >>>>>
> >         >>>>>
> >         >>>>>
> >         >>
> >          _______________________________________________
> >         >>>>> iRail mailing list
> >         >>>>> iRail at list.irail.be
> >         >>>>>
> >         >>
> >          http://lists.rootspirit.com/mailman/listinfo/irail
> >         >>>>
> >         >>
> >          _______________________________________________
> >         >>>> iRail mailing list
> >         >>>> iRail at list.irail.be
> >         >>>>
> >         >>
> >          http://lists.rootspirit.com/mailman/listinfo/irail
> >         >>>
> >         >>>
> >         >>>
> >         >>
> >          _______________________________________________
> >         >>>                iRail mailing list
> >         >>>                iRail at list.irail.be
> >         >>>
> >         >>
> >          http://lists.rootspirit.com/mailman/listinfo/irail
> >         >>>
> >         >>>
> >         >>>
> >         >>>
> >         >>>        --
> >         >>>        Joris Timmerman
> >         >>>        joris.timmerman at gmail.com
> >         >>>
> >         >>>
> >         >>>
> >         >>>
> >         >>> --
> >         >>> Joris Timmerman
> >         >>> joris.timmerman at gmail.com
> >         >>>
> >         >>> _______________________________________________
> >         >>> iRail mailing list
> >         >>> iRail at list.irail.be
> >         >>> http://lists.rootspirit.com/mailman/listinfo/irail
> >         >>
> >         >>
> >         >>
> >          _______________________________________________
> >         >>                iRail mailing list
> >         >>                iRail at list.irail.be
> >         >>
> >          http://lists.rootspirit.com/mailman/listinfo/irail
> >         >>
> >         >>
> >         >>
> >         >>
> >         >>
> >         >>        --
> >         >>        Joris Timmerman
> >         >>        joris.timmerman at gmail.com
> >         >>
> >         >>
> >         >>
> >         >>
> >         >> --
> >         >> Joris Timmerman
> >         >> joris.timmerman at gmail.com
> >         >>
> >         >> _______________________________________________
> >         >> iRail mailing list
> >         >> iRail at list.irail.be
> >         >> http://lists.rootspirit.com/mailman/listinfo/irail
> >         >
> >         >
> >         > _______________________________________________
> >         > iRail mailing list
> >         > iRail at list.irail.be
> >         > http://lists.rootspirit.com/mailman/listinfo/irail
> >         _______________________________________________
> >         iRail mailing list
> >         iRail at list.irail.be
> >         http://lists.rootspirit.com/mailman/listinfo/irail
> >
> >
> >
> >
> > --
> > Joris Timmerman
> > joris.timmerman at gmail.com
> >
> > _______________________________________________
> > iRail mailing list
> > iRail at list.irail.be
> > http://lists.rootspirit.com/mailman/listinfo/irail
>
>
> _______________________________________________
> 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/1eb52ed6/attachment-0003.html>


More information about the iRail mailing list