irail-web-app's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.