nabeelamjad / poke-api

Poke API - A Ruby API gem for Pokémon GO.
MIT License
82 stars 22 forks source link

Fix mapping of item_id in rpc_sub #6

Closed coalwater closed 8 years ago

coalwater commented 8 years ago

When comparing the app to the api values, I found that most items were not mapped to symbols, and the ones that were getting mapped are showing incorrect values. Found out that it was incorrectly mapping to categories where it should be mapping to ids. Not sure if this is a complete fix, but it fixed the issue for me.

coalwater commented 8 years ago

@nabeelamjad If this fix is correct, is there an easy way to map the symbol back to the integer values to use in subsequent requests?

nabeelamjad commented 8 years ago

@coalwater, that fix is correct yes. Once the proto files are updates any issues should be resolved related to that hopefully.

What exactly did you mean with your last comment? What is the expected input / output? You can always map the constant names back to integer using something like RpcEnum::ItemId::ITEM_REVIVE, though if you can provide some examples I'll see if I change the behavior slightly so it's easy to retrieve them.

coalwater commented 8 years ago

@nabeelamjad Nevermind, after the fix I was able to use the symbols instead of the integer values.

nabeelamjad commented 8 years ago

Alright, I will look into getting the Proto files updated all together (I'll create a separate branch for that and merge it in later).

nabeelamjad commented 8 years ago

Going to close this PR as I've merged the latest protobufs in now, thanks in any case!