tejado / pgoapi

Pokemon Go API lib
Other
1.4k stars 447 forks source link

Any way to determine Pokemon Level through the API? #212

Closed Wegi closed 7 years ago

Wegi commented 7 years ago

Is there any way to determine the Pokemon level with an API call? As far as I can see if one makes an get_inventory call, we do not receive any info on Pokemon level or powerup cost.

webdes87 commented 7 years ago

You can estimate it with CP Multiplyer and lists like this window.cpMultiplierByLevel = [0.094, 0.16639787, 0.21573247, 0.25572005, 0.29024988, 0.3210876 , 0.34921268, 0.37523559, 0.39956728, 0.42250001, 0.44310755, 0.46279839, 0.48168495, 0.49985844, 0.51739395, 0.53435433, 0.55079269, 0.56675452, 0.58227891, 0.59740001, 0.61215729, 0.62656713, 0.64065295, 0.65443563, 0.667934, 0.68116492, 0.69414365, 0.70688421, 0.71939909, 0.7317, 0.73776948, 0.74378943, 0.74976104, 0.75568551, 0.76156384, 0.76739717, 0.7731865, 0.77893275, 0.78463697, 0.79030001]; (Sorry, javascript, just copied out from my project) Source: https://www.reddit.com/r/TheSilphRoad/comments/4t7r4d/exact_pokemon_cp_formula/ (Post of: hawkxor)

Trolldemorted commented 7 years ago

while we are at it, what about the IVs?

Wegi commented 7 years ago

You can see the IV, when you do a get_inventory() call. Inside the response are pokemon_data dictionaries that contain the IVs.

Thank you @webdes87 . Was hoping for an automatic delivery, but that does the trick. :)