0.2.7 • Published 10 years ago

systeo-transdev-idf v0.2.7

Weekly downloads
39
License
-
Repository
github
Last release
10 years ago

node-systeo-transdev

NPM version Build Status

This NPM module retrieves the next practical and theorical schedules of the bus equiped with Systeo in Île-de-France. It now only works with the STRAV network.

Be careful as this is very experimental for now.

Unit testing fails a lot due to the server being unstable. As such, Error raised when line/stop doesn't exist, does not actually mean that the line/stop doesn't exist. I can't do more to correct this issue...

Features

  • Get bus lines
  • Get stops
  • Get next schedules for a given bus line/stop
  • Work on both server and client side, with Browserify and no dependencies (~80-85Ko)

Usage

var systeoTransdevIDF = require('systeo-transdev-idf');

// Lines

systeoTransdevIDF.getLines(function(err, lines) {
  if (err) { console.log(err.message);  };
  
  // lines = { 'J1': '268435472', ... } // nameOfTheLine: IDOfTheLine
});

// Stops

systeoTransdevIDF.getStops('268435472', function(err, stops) {
  if (err) { console.log(err.message);  };
  
  // stops = { 'GARIBALDI': 'GARIBALDI', ... } // nameOfTheStop: IDOfTheStop
});

// Schedules

systeoTransdevIDF.getSchedules('268435472', 'GARIBALDI', function(err, schedules) {
  if (err) { console.log(err.message);  };
  
  /* schedules = {
  *    'noMoreToday': false, // Are there still bus for today?
  *    'schedules': [{
  *      'realtime': true, // Is this realtime or theorical time?
  *      'pmr': true, // Bus with disabled facilities?
  *      'remainingTime': '1h16', // Representation of remaining time in minutes ('1h10' || '15')
  *      'destination': 'GARE DE VILLE.-ST-GEORGES',
  *      'via': 'GARE DE BOISSY-ST-LEGER' // Optional, if there is a via
  *    }]
  * };
  */
});
0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago