https://github.com/pgrimaud/sytadin
Real time information about road traffic on the Paris beltway
https://github.com/pgrimaud/sytadin
package paris php road-traffic scraper sdk sytadin
Last synced: about 2 months ago
JSON representation
Real time information about road traffic on the Paris beltway
- Host: GitHub
- URL: https://github.com/pgrimaud/sytadin
- Owner: pgrimaud
- Created: 2016-04-06T22:35:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T17:32:56.000Z (almost 4 years ago)
- Last Synced: 2025-04-02T05:14:38.239Z (3 months ago)
- Topics: package, paris, php, road-traffic, scraper, sdk, sytadin
- Language: PHP
- Homepage:
- Size: 38.1 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Sytadin
[](https://packagist.org/packages/pgrimaud/sytadin)
[](https://travis-ci.org/pgrimaud/sytadin)Real time information about road traffic on the Paris beltway.
## Usage
```
composer require pgrimaud/sytadin
``````php
$api = new \Sytadin\Api();$parameters = [
'start' => 'orleans',
'end' => 'bercy',
'direction' => $api::DIRECTION_EXTERIOR
];$api->setParameters($parameters);
$route = $api->getRoute();echo $route->getStart()->getName() . PHP_EOL;
//orleansecho $route->getEnd()->getName() . PHP_EOL;
//bercyforeach ($route->getSections() as $section) {
echo $section->getStart()->getName() . '->' . $section->getEnd()->getName() . PHP_EOL;
echo $section->getTime() . ' (ref :' . $section->getTimeReference() . ')' . PHP_EOL;
}
//orleans->italie
//8 (ref :4)
//italie->bercy
//4 (ref :2)//reference time
echo $route->getTimeReference() . PHP_EOL;
//6//real time
echo $route->getTime() . PHP_EOL;
//12//kilometers
echo $route->getKms() . PHP_EOL;
//8
```If **Time** is superior to the **TimeReference**, it means there is some traffic jams.
## Gates available
```php
foreach (\Sytadin\Gate::listGates() as $gate) {
echo $gate . PHP_EOL;
}
``````
chapelle
maillot
auteuil
orleans
italie
bercy
bagnolet
```## Copyright
No copyright, based & crawled on Sytadin website ([http://www.sytadin.fr](http://www.sytadin.fr))