Giter Site home page Giter Site logo

irail-web-app's People

Contributors

barbarosso avatar fspin avatar pascal-codetaal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

irail-web-app's Issues

Leave out the typeOfTransport parameter, so iRail chooses the right one automatically

Hi,

While I didn't have the time yet to try out this web-app myself, I noticed that you send the typeOfTransport parameter to iRail, which is always hardcoded to 'trains'. (here: https://github.com/barbarosso/irail-web-app/blob/master/services/irail.js#L25)

I suggest that you leave out that parameter (so the iRail API handles it), or to use some logic to determine the right type of transport depending on the stations.
iRail gets its data from the NMBS, and unfortunately the NMBS hides local trains sometimes if there is a faster high-speed alternative. In other words, sometimes local trains are missing because there is a Thalys, ICE, ... connection which is faster, even though normal travellers can't take those (you need a special ticket). You can read the original issue here: iRail/iRail#356 .
How iRail handles this: https://github.com/iRail/iRail/blob/master/api/data/NMBS/connections.php#L142

If you are searching between Belgian stations you should use noInternationalTrains to prevent this. You can either leave out the parameter so iRail automaticity determines the right type based on the country in which the station lies, or you can implement such logic yourself.

It's a small finishing touch, but given the small time needed to fix it, it seems best to implement a solution.

If something isn't 100% clear, feel free to ask! Hope this helps with the development of your webapp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.