bramdevries/irail-php

A PHP wrapper for iRail.be

1.1.0 2014-08-16 21:48 UTC

This package is auto-updated.

Last update: 2024-03-29 02:50:53 UTC


README

A Composer compatible PHP wrapper for iRail.be

Usage

Using this can literaly not be easier. Just require it using composer:

composer require bramdevries/irail-php

Then create an instance

use iRail\Client as iRail;

$irail = new iRail();

If you want a list of all the belgian railway stations:

$stations = $irail->api('stations')->all();

To get info about a connection between two stations:

$connection = $irail->api('connection')->schedule('Tienen', 'Courtrai');

For other usage you can check the example file included.