SlideShare a Scribd company logo
iRail & BeTrains




    @KevinVanWilder
iRail API
                           /stations/




<stations timestamp="050810">
          <station locationX="4.038586" locationY="50.1345678">
                    AALST
          </station>
           ...
</stations>
iRail API
/liveboard/?station=STATIONNAME
     /liveboard/?id=BE.NMBS.1

                  <liveboard version="1.0“ timestamp="123456789">
                    <station locationX="4.21485" locationY="...">
                      GENT ST P [B]
                    </station>

                   <departures number="2">

                     <departure delay="xx" id="0">
                        <station locationX="..." locationY="...">
                          STATIONNAME
                        </station>
                        <vehicle>
                          Be.NMBS.P2000
                        </vehicle>
                        <time formatted="iso8601">U</time>
                        <platform>X</platform>
                     </departure>
                     ...

                  </departures>
                  </liveboard>
iRail API
• Train schedules
  /connections/?to=STATION1&from=STATION2

• List all stations
  /stations/

• Station liveboard
  /liveboard/?station=STATIONNAME

• Vehicle information
  /vehicle/?id=Be.NMBS.P1234
18000

16000

14000

12000

10000

 8000

 6000

 4000

 2000

   0
  2/10/2010   2/11/2010   2/12/2010   2/01/2011
iRailForJ
IRail iRail = new IRail("http://api.irail.be","nl");

List<Connection> connections =
        iRail.getConnections("LIEDEKERKE","BRUSSEL CENTRAAL");

for(Connection connection : connections) {

       TripNode departure = connection.getDeparture();
       TripNode arrival = connection.getArrival();

       departure.getStation().getName()      // Schaerbeek
       departure.getVehicle().getType()      // IC2367
       departure.getDelay()                  // 60

}
Old: http://code.google.com/p/betrains/
New: http://code.google.com/p/betrains-android/

             http://project.irail.be

More Related Content

Similar to iRail & betrains

Biztalk ESB Toolkit Demos
Biztalk ESB Toolkit DemosBiztalk ESB Toolkit Demos
Biztalk ESB Toolkit Demos
Mohamed Zakarya Abdelgawad
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
DevClub_lv
 
From unREST to REST
From unREST to RESTFrom unREST to REST
From unREST to REST
Anand Srinivasan
 
Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web Service
Bin Cai
 
Payments On Rails
Payments On RailsPayments On Rails
Payments On Rails
E-xact Transactions
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++Dendi Riadi
 
TechShift: There’s light beyond LAMP
TechShift: There’s light beyond LAMPTechShift: There’s light beyond LAMP
TechShift: There’s light beyond LAMP
Stephen Tallamy
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
艾鍗科技
 
Node.js server-side rendering
Node.js server-side renderingNode.js server-side rendering
Node.js server-side rendering
The Software House
 
Prompted Lean PDF
Prompted Lean PDFPrompted Lean PDF
Prompted Lean PDF
Juergen Gschloessl
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
Wynn Netherland
 
Aviation and Erlang
Aviation and ErlangAviation and Erlang
Aviation and Erlang
Thomas Karsten
 
Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發
HO-HSUN LIN
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
Carol McDonald
 
Testing Services Effectively
Testing Services Effectively Testing Services Effectively
Testing Services Effectively
Alberto Leal
 
Edge_AI_Assignment_3.pdf
Edge_AI_Assignment_3.pdfEdge_AI_Assignment_3.pdf
Edge_AI_Assignment_3.pdf
ShivamMishra603376
 
Crie seu sistema REST com JAX-RS e o futuro
Crie seu sistema REST com JAX-RS e o futuroCrie seu sistema REST com JAX-RS e o futuro
Crie seu sistema REST com JAX-RS e o futuro
Guilherme Silveira
 
Elixir & apis - presentation at ElixirConf 2016
Elixir & apis - presentation at ElixirConf 2016Elixir & apis - presentation at ElixirConf 2016
Elixir & apis - presentation at ElixirConf 2016
Victoria Wagman
 
Asp.Net Mvc Internals &amp; Extensibility
Asp.Net Mvc Internals &amp; ExtensibilityAsp.Net Mvc Internals &amp; Extensibility
Asp.Net Mvc Internals &amp; Extensibility
Eyal Vardi
 

Similar to iRail & betrains (20)

Aimaf
AimafAimaf
Aimaf
 
Biztalk ESB Toolkit Demos
Biztalk ESB Toolkit DemosBiztalk ESB Toolkit Demos
Biztalk ESB Toolkit Demos
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
 
From unREST to REST
From unREST to RESTFrom unREST to REST
From unREST to REST
 
Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web Service
 
Payments On Rails
Payments On RailsPayments On Rails
Payments On Rails
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
 
TechShift: There’s light beyond LAMP
TechShift: There’s light beyond LAMPTechShift: There’s light beyond LAMP
TechShift: There’s light beyond LAMP
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
Node.js server-side rendering
Node.js server-side renderingNode.js server-side rendering
Node.js server-side rendering
 
Prompted Lean PDF
Prompted Lean PDFPrompted Lean PDF
Prompted Lean PDF
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
Aviation and Erlang
Aviation and ErlangAviation and Erlang
Aviation and Erlang
 
Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發Chaincode Development 區塊鏈鏈碼開發
Chaincode Development 區塊鏈鏈碼開發
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
Testing Services Effectively
Testing Services Effectively Testing Services Effectively
Testing Services Effectively
 
Edge_AI_Assignment_3.pdf
Edge_AI_Assignment_3.pdfEdge_AI_Assignment_3.pdf
Edge_AI_Assignment_3.pdf
 
Crie seu sistema REST com JAX-RS e o futuro
Crie seu sistema REST com JAX-RS e o futuroCrie seu sistema REST com JAX-RS e o futuro
Crie seu sistema REST com JAX-RS e o futuro
 
Elixir & apis - presentation at ElixirConf 2016
Elixir & apis - presentation at ElixirConf 2016Elixir & apis - presentation at ElixirConf 2016
Elixir & apis - presentation at ElixirConf 2016
 
Asp.Net Mvc Internals &amp; Extensibility
Asp.Net Mvc Internals &amp; ExtensibilityAsp.Net Mvc Internals &amp; Extensibility
Asp.Net Mvc Internals &amp; Extensibility
 

iRail & betrains

  • 1. iRail & BeTrains @KevinVanWilder
  • 2.
  • 3.
  • 4. iRail API /stations/ <stations timestamp="050810"> <station locationX="4.038586" locationY="50.1345678"> AALST </station> ... </stations>
  • 5. iRail API /liveboard/?station=STATIONNAME /liveboard/?id=BE.NMBS.1 <liveboard version="1.0“ timestamp="123456789"> <station locationX="4.21485" locationY="..."> GENT ST P [B] </station> <departures number="2"> <departure delay="xx" id="0"> <station locationX="..." locationY="..."> STATIONNAME </station> <vehicle> Be.NMBS.P2000 </vehicle> <time formatted="iso8601">U</time> <platform>X</platform> </departure> ... </departures> </liveboard>
  • 6. iRail API • Train schedules /connections/?to=STATION1&from=STATION2 • List all stations /stations/ • Station liveboard /liveboard/?station=STATIONNAME • Vehicle information /vehicle/?id=Be.NMBS.P1234
  • 7. 18000 16000 14000 12000 10000 8000 6000 4000 2000 0 2/10/2010 2/11/2010 2/12/2010 2/01/2011
  • 8.
  • 9. iRailForJ IRail iRail = new IRail("http://api.irail.be","nl"); List<Connection> connections = iRail.getConnections("LIEDEKERKE","BRUSSEL CENTRAAL"); for(Connection connection : connections) { TripNode departure = connection.getDeparture(); TripNode arrival = connection.getArrival(); departure.getStation().getName() // Schaerbeek departure.getVehicle().getType() // IC2367 departure.getDelay() // 60 }
  • 10.
  • 11.
  • 12.
  • 13.