/node-pogo-protos

Pokémon Go Protobuf files from POGOProtos, wrapped up in a Node module using protobuf.js

Primary LanguageProtocol BufferMIT LicenseMIT

node-pogo-protos

Uses protobuf.js to compile the Protobuf files from POGOProtos into an easy to use Node module.

Contains a workaround that fixes the proto3 packed fields bug in protobuf.js for you.

npm version npm downloads dependencies license

How to use

const POGOProtos = require('node-pogo-protos');

var myMessage = new POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage({
  item_id: POGOProtos.Inventory.Item.ItemId.ITEM_POTION,
  count: 50
});

var encoded = myMessage.encode();

var decodedAgain = POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage.decode(encoded);
console.log(decodedAgain.count); // will print 50

For more details see the protobuf.js documentation.