lyrixx/ratp

This package is abandoned and no longer maintained. No replacement package was suggested.

A little crawler/sdk for retrieve in real time information about transport in Paris

Maintainers

Details

github.com/lyrixx/ratp

Source

Issues

Installs: 92

Dependents: 0

Suggesters: 0

Security: 0

Stars: 18

Watchers: 0

Forks: 2

Open Issues: 0

pkg:composer/lyrixx/ratp

v1.0.0 2015-10-16 15:40 UTC

This package is auto-updated.

Last update: 2020-02-11 18:04:04 UTC


README

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';
}