Skip to content

marvinroger/node-systeo-transdev-idf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  *    }]
  * };
  */
});

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published