0.0.2 • Published 10 years ago

tfl-bus-api v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

#tfl-bus-api (WIP) Build Status 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
0.0.2

10 years ago

0.0.1

10 years ago