MobilityData/gtfs-realtime-bindings

Node.js code documentation

Closed this issue · 4 comments

Parsing a GTFS-realtime feed is shown in the README as:

var feed = GtfsRealtimeBindings.FeedMessage.decode(body);

But for it to work it must be:

var feed = GtfsRealtimeBindings.transit_realtime.FeedMessage.decode(body);

Thanks @julianrojas87! I just updated the docs.

Hi @barbeau, thanks for updating the docs here! I just wanted to add that the docs on the official Google Transit API Node.js sample and the NPM package page have the old example with GtfsRealtimeBindings.FeedMessage.decode(body) as well. Please let me know if it would be helpful for me to open a new issue for this.

@wmcb91 Thanks for flagging this! Yes, could you open a new issue for the Google docs? I'll re-open this issue for the NPM docs, as I believe I can edit those directly.

Ok, NPM README should now be fixed. Please let me know if it doesn't look right to you.