transilien

1.0.0 • Public • Published

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 transilien

Usage

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 code
  • callback with 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

Readme

Keywords

Package Sidebar

Install

npm i transilien

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • joliscri.pt