1.0.0 • Published 11 years ago
transilien v1.0.0
transilien
Get the status (ok or ko) of the railways traffic according Lines.
Keynote
Get the status (ok or ko) of the railways traffic according Lines.
Install
$ npm install --save transilienUsage
var transilien = require('transilien');
// Get traffic status for all Lines
transilien.lignes(callback);
// Get traffic status for Lines L and U
transilien.lignes(["L","U"],callback);Callback results example
[{
"line": "L",
"status": "ok",
"message": "Trafic normal"
},
{
"line": "N",
"status": "nok",
"message": "Ligne N : retards Paris Montparnasse - Dreux"
}]Methods
transilien.lignes([code],callback)With
code, optional, array containing list of Lines codecallbackwith error return and Lines traffic status results.
Status Schema
{
"title": "Line status",
"type": "object",
"properties": {
"line": {
"type": "string",
"description": "Code line"
},
"status": {
"type": "string",
"description": "Traffic status"
},
"message": {
"type": "string",
"description": "Traffic message"
}
},
"required": ["line", "status", "message"]
}JSON Example
{
"line": "L",
"status": "ok",
"message": "Trafic normal"
}License
MIT © Yassine AZZOUT
1.0.0
11 years ago