Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

pogo-decode

0.5.2 • Public • Published

POGOdecode NPM Version

Decode Pokemon GO requests with their equivalent responses.

Install

$ npm install --save pogo-decode

Usage

var fs = require("fs");
var decode = require("../index.js");
 
// both raw pokemon go traffic dumps
var req = fs.readFileSync("0_req.dump");
var res = fs.readFileSync("0_res.dump");
 
var options = {
  decodeLongs: true,
  removeNulls: true
};
 
var output = decode(req, res, options); // returns decoded request and response

API

decode(request, response, options)

Parameter Type Description
request Buffer Request buffer
response Buffer Response buffer
options object Options
@returns object Corresponding output

Options

Parameter Type Description
decodeLong boolean Automatically decode longs
removeNulls boolean Remove all null keys
encodeBuffers boolean Encode buffers to binary

Install

npm i pogo-decode

DownloadsWeekly Downloads

7

Version

0.5.2

License

MIT

Last publish

Collaborators

  • avatar