max-mapper / nextbus-live-feed

converts the XML vehicleLocations API from nextbus (buses that have moved in last x minutes) to a stream-like thing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nextbus-live-feed

get vehicle locations from the nextbus API as JSON

NPM

  var feed = require('nextbus-live-feed')
  var fetchEvery = 1000 * 5
  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"
}

About

converts the XML vehicleLocations API from nextbus (buses that have moved in last x minutes) to a stream-like thing


Languages

Language:JavaScript 100.0%