tfl-bus-api
v0.0.2
Published
Grab bus info
Downloads
4
Readme
#tfl-bus-api (WIP) Simple node service for grabbing bus route information.
##Usage:
//Using a promise
var myBus = new Bus(11).then(function(bus) {
//access to methods on bus
});
//Using a callback
var myBus = new Bus(11, function(bus) {
//access to methods on bus
});
###Methods:
bus.first() //Return lat & lng for first bus stop
bus.last() //Return lat & lng for last bus stop
/**
* Search list of stops by smsCode/name displayed on stop sign
* @param smsCode {Number}
* @returns {id, smsCode, name, stopIndicator, towards, direction, lat, lng, routes}
*/
bus.findStopBySmsCode(int)
bus.findStopByName(String)
bus.geometry() // Returns array of lat & lng, start to end