1.0.0 • Published 11 years ago

nextbus-live-feed v1.0.0

Weekly downloads
1
License
BSD
Repository
-
Last release
11 years ago

nextbus-live-feed

get vehicle locations from the nextbus API as JSON

NPM

  var fetchEvery = 1000 * 5
  require('nextbus-live-feed')('actransit', fetchEver, function onLocation(err, location) {
    
  })

data looks like this:

{
  dirTag: "51A_91_1",
  heading: "345",
  id: "1054",
  lastUpdated: "1396983363000",
  lat: "37.7824325",
  lon: "-122.2763977",
  predictable: "true",
  routeTag: "51A",
  secsSinceReport: "68",
  speedKmHr: "5"
}