All Projects → lyrixx → ratp

lyrixx / ratp

Licence: MIT license
A little crawler/sdk for retrieve in real time information about transport in Paris

Programming Languages

PHP
23972 projects - #3 most used programming language

Ratp SDK

SensioLabsInsight Build Status

This repository contains a small library to consume the RATP REST web service (huhu)

Usage

$api = new Lyrixx\Ratp\Api();

$stop = array(
    array('line' => '138', 'stop' => 'General Leclerc-Victor Hugo', 'type' => $api::TYPE_BUS),
);

$stops = $api->getStops($stop);

$stops[0]->getName(); // 'General Leclerc-Victor Hugo'
$stops[0]->getLine(); // '138'
$stops[0]->getType(); // 'metro'

$direction = $stops[0]->getDirection('Ermont-Eaubonne RER.');
foreach($direction->getSchedule() as $time) {
    echo $time; // '11 mn';
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].