pogo-protos

Pokémon Go Protobuf files from POGOProtos, wrapped up in a Node module

node-pogo-protos

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

How to use

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

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

var encoded = POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage.encode(myMessage).finish();

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

For more details see the protobuf.js documentation.

Usage with TypeScript

TypeScript definitions are included. Modern IDE should use them automatically.

HomePage

https://github.com/pogosandbox/pogo-protos#readme

Repository

git+https://github.com/pogosandbox/pogo-protos.git


相关推荐