Parse and serialize GTFS Realtime data encoded as protocol buffers.
npm install gtfs-rt-bindingsParse and serialize GTFS Realtime.

!ISC-licensed


This package is an alternative to gtfs-realtime-bindings, which is not getting updated frequently.
``shell`
npm install gtfs-rt-bindings
`js
const {TripUpdate} = require('gtfs-rt-bindings')
const data = {
trip: {
trip_id: 'trip-1',
route_id: 'route-1'
},
stop_time_update: [{
stop_sequence: 3,
arrival: {delay: 30}
}]
}
TripUpdate.verify(data)
const buf = TripUpdate.encode(data).finish()
console.log(buf)
//
const parsedData = TripUpdate.toObject(TripUpdate.decode(buf))
console.log(parsedData)
`
If you have a question or have difficulties using gtfs-rt-bindings`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.