MobilityData / gtfs-realtime-bindings

Language bindings generated from the GTFS Realtime protocol buffer spec for popular languages.
Apache License 2.0
373 stars 129 forks source link

Node.js code documentation #50

Closed julianrojas87 closed 4 years ago

julianrojas87 commented 5 years ago

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);
barbeau commented 5 years ago

Thanks @julianrojas87! I just updated the docs.

wmcb91 commented 4 years ago

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.

barbeau commented 4 years ago

@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.

barbeau commented 4 years ago

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