Skip to content

cmdoptesc/nextbusser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nextBusser

nextBusser is a JavaScript library to query the NextBus API (pdf doc) and parse the resulting XML data.

Callbacks can be provided to the functions, or they will return a basic jQuery promise that will have the methods .then(), .done(), and .fail().

An earlier version of nextbusser was used for my muniNow app (repo).

Usage

// initialise a nextBusser object
var nb = makeNextBusser('sf-muni');

// to change agencies
nb.setAgency('actransit');

// to get all the routes -- this can take a callback or return a promise
var promise = nb.routesList(callerback);

promise.done(function(list) {
  console.log(list);
});

function callerback(routes) {
  console.log(list);
}

Dependencies

jQuery 1.10.x or 2.x

Further Work

  • add in schedule

License

al lin, sep 2013
MIT, do as you will license..

About

JavaScript library to query and parse the NextBus API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published