2.187.0 • Published 5 months ago

@na-ji/pogo-protos v2.187.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

pogo-protos Donate

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

Test Build license

How to use

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

const nbPokemon = Object.keys(POGOProtos.Rpc.HoloPokemonId).length -1;
console.log(`We have ${nbPokemon} pokemons in protos.`);
const nbCostumes = Object.keys(POGOProtos.Rpc.PokemonDisplayProto.Costume).length -1;
console.log(`We have ${nbCostumes} costumes in protos.`);
const nbForms = Object.keys(POGOProtos.Rpc.PokemonDisplayProto.Form).length -1;
console.log(`We have ${nbForms} forms in protos.`);
const nbBadges = Object.keys(POGOProtos.Rpc.HoloBadgeType).length -1;
console.log(`We have ${nbBadges} badges in protos.`);
const nbMoves = Object.keys(POGOProtos.Rpc.HoloPokemonMove).length -1;
console.log(`We have ${nbMoves} moves in protos.`);
const nbItems = Object.keys(POGOProtos.Rpc.Item).length -1;
console.log(`We have ${nbItems} items in protos.`);
const nbMethodRequests = Object.keys(POGOProtos.Rpc.Method).length -1;
console.log(`We have ${nbMethodRequests} method requests in protos.`);
const nbSocialRequests = Object.keys(POGOProtos.Rpc.InternalSocialAction).length -1;
console.log(`We have ${nbSocialRequests} social requests in protos.`);
const nbPlatformRequests = Object.keys(POGOProtos.Rpc.PlatformClientAction).length -1;
console.log(`We have ${nbPlatformRequests} platform requests in protos.`);
const nbGameActionClientRequests = Object.keys(POGOProtos.Rpc.GameBackgroundModeAction).length -1;
console.log(`We have ${nbGameActionClientRequests} game action client requests in protos.`);
const nbGameActionRequests = Object.keys(POGOProtos.Rpc.GameIapAction).length -1;
console.log(`We have ${nbGameActionRequests} game action requests in protos.`);
const nbGameAdventureSyncRequests = Object.keys(POGOProtos.Rpc.GameAdventureSyncAction).length -1;
console.log(`We have ${nbGameAdventureSyncRequests} game adventure sync requests in protos.`);
const nbPGameOthersRequests = Object.keys(POGOProtos.Rpc.GameAccountRegistryActions).length -1;
console.log(`We have ${nbPGameOthersRequests} game others requests in protos.`);
const nbPlayerSubmissionsRequests = Object.keys(POGOProtos.Rpc.TitanPlayerSubmissionAction).length -1;
console.log(`We have ${nbPlayerSubmissionsRequests} Player Submissions requests in protos.`);
const nbGamefitnessRequests = Object.keys(POGOProtos.Rpc.GameFitnessAction).length -1;
console.log(`We have ${nbGamefitnessRequests} game fitness requests in protos.`);

// Count of all req's
const all_in_one = nbMethodRequests 
+ nbSocialRequests 
+ nbPlatformRequests 
+ nbGameActionClientRequests 
+ nbGameActionRequests 
+ nbGameAdventureSyncRequests 
+ nbPGameOthersRequests 
+ nbPlayerSubmissionsRequests 
+ nbGamefitnessRequests;

console.log(`We have ${all_in_one} (GLOBAL) multi method requests in protos.\n`);

var myMessage = POGOProtos.Rpc.RecycleItemProto.fromObject({
    item: POGOProtos.Rpc.Item.ITEM_POTION,
    count: 50
});
  
var encoded = POGOProtos.Rpc.RecycleItemProto.encode(myMessage).finish();
var decodedAgain = POGOProtos.Rpc.RecycleItemProto.decode(encoded);
console.log('Test encode/decode:\nItem: ' + decodedAgain.item + ' count: ' + decodedAgain.count);

// will print:
// We have x pokemons in protos.
// We have x costumes in protos.
// We have x forms in protos.
// We have x badges in protos.
// We have x moves in protos.
// We have x items in protos.
// We have x method requests in protos.
// We have x social requests in protos.
// We have x platform requests in protos.
// We have x game action client requests in protos.
// We have x game action requests in protos.
// We have x game adventure sync requests in protos.
// We have x game others requests in protos.
// We have x Player Submissions requests in protos.
// We have x game fitness requests in protos.
// We have x (GLOBAL) multi method requests in protos.

//Test encode/decode:
//Item: 101 count: 50

For more details see the protobuf.js documentation.

Usage with TypeScript

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

2.169.0

10 months ago

2.165.0

11 months ago

2.184.0

6 months ago

2.161.0

12 months ago

2.180.0

7 months ago

2.177.0

7 months ago

2.173.0

9 months ago

2.168.0

10 months ago

2.164.0

11 months ago

2.187.0

5 months ago

2.183.0

6 months ago

2.183.1

6 months ago

2.176.0

8 months ago

2.172.0

9 months ago

2.167.0

10 months ago

2.186.0

5 months ago

2.163.0

11 months ago

2.182.0

6 months ago

2.179.0

7 months ago

2.175.0

8 months ago

2.171.0

9 months ago

2.185.0

5 months ago

2.166.0

11 months ago

2.181.0

7 months ago

2.162.0

12 months ago

2.178.0

7 months ago

2.174.0

8 months ago

2.170.0

10 months ago

2.160.0

1 year ago

2.159.0

1 year ago

2.158.0

1 year ago

2.154.0

1 year ago

2.157.0

1 year ago

2.156.0

1 year ago

2.155.0

1 year ago

2.153.0

1 year ago

2.152.0

1 year ago

2.151.0

1 year ago

2.150.0

1 year ago

2.148.0

1 year ago

2.146.0

1 year ago

2.144.0

1 year ago

2.142.0

1 year ago

2.140.0

1 year ago

2.139.0

1 year ago

2.137.0

1 year ago

2.135.0

1 year ago

2.133.0

1 year ago

2.149.0

1 year ago

2.147.0

1 year ago

2.145.0

1 year ago

2.143.0

1 year ago

2.141.0

1 year ago

2.138.0

1 year ago

2.136.0

1 year ago

2.132.0

1 year ago

2.131.0

2 years ago

2.130.0

2 years ago

2.129.0

2 years ago

2.128.0

2 years ago

2.127.0

2 years ago

2.126.0

2 years ago

2.125.0

2 years ago

2.124.0

2 years ago

2.123.0

2 years ago

2.122.0

2 years ago

2.121.0

2 years ago

2.120.0

2 years ago

2.119.0

2 years ago

2.118.0

2 years ago

2.117.0

2 years ago

2.116.0

2 years ago

2.115.0

2 years ago

2.114.0

2 years ago

2.113.0

2 years ago

2.112.0

2 years ago

2.111.0

2 years ago

2.109.0

2 years ago

2.110.0

2 years ago

2.108.0

2 years ago

2.107.0

2 years ago

2.106.0

2 years ago

2.105.0

2 years ago

2.104.0

2 years ago

2.103.0

2 years ago

2.102.0

2 years ago

2.101.0

2 years ago

2.99.0

2 years ago

2.100.0

2 years ago

2.68.0

2 years ago

2.69.0

2 years ago

2.95.0

2 years ago

2.74.0

2 years ago

2.96.0

2 years ago

2.73.0

2 years ago

2.93.0

2 years ago

2.72.0

2 years ago

2.94.0

2 years ago

2.71.0

2 years ago

2.78.0

2 years ago

2.77.0

2 years ago

2.97.0

2 years ago

2.76.0

2 years ago

2.98.0

2 years ago

2.75.0

2 years ago

2.91.0

2 years ago

2.70.0

2 years ago

2.92.0

2 years ago

2.90.0

2 years ago

2.79.0

2 years ago

2.85.0

2 years ago

2.84.0

2 years ago

2.83.0

2 years ago

2.82.0

2 years ago

2.67.0

2 years ago

2.89.0

2 years ago

2.88.0

2 years ago

2.87.0

2 years ago

2.86.0

2 years ago

2.81.0

2 years ago

2.80.0

2 years ago

2.66.0

2 years ago

2.65.0

2 years ago

2.64.1

2 years ago

2.64.0

2 years ago

2.63.0

2 years ago

2.62.0

2 years ago

2.61.0

2 years ago

2.60.0

2 years ago

2.59.1

2 years ago

2.59.0

2 years ago