We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, please help me, how I can get level of Pokemon GO user?
The text was updated successfully, but these errors were encountered:
You need to call the "GetInventory" API call.
Then you can get more information about the player, please see:
api.GetInventory(function (err, inventory) { if (!err) { var cleanedInventory = { player_stats: null, eggs : [], pokemon: [], items: [] }; for (var i = 0; i < inventory.inventory_delta.inventory_items.length; i++) { var inventory_item_data = inventory.inventory_delta.inventory_items[i].inventory_item_data; // Check for pokemon. if (inventory_item_data.pokemon) { var pokemon = inventory_item_data.pokemon; if (pokemon.is_egg) { console.log(' [E] ' + pokemon.egg_km_walked_target + ' Egg'); cleanedInventory.eggs.push(pokemon); } else { var pokedexInfo = api.pokemonlist[parseInt(pokemon.pokemon_id) - 1]; console.log(' [P] ' + pokedexInfo.name + ' - ' + pokemon.cp + ' CP'); cleanedInventory.pokemon.push(pokemon); } } // Check for player stats. if (inventory_item_data.player_stats) { var player = inventory_item_data.player_stats; console.log(' [PL] Level ' + player.level + ' - ' + player.unique_pokedex_entries + ' Unique Pokemon'); cleanedInventory.player_stats = player; } // Check for item. if (inventory_item_data.item) { var item = inventory_item_data.item; console.log(' [I] ' + item.item_id + ' - ' + item.count); cleanedInventory.items.push(item); } } callback(cleanedInventory); } });
Sorry, something went wrong.
No branches or pull requests
Hi, please help me, how I can get level of Pokemon GO user?
The text was updated successfully, but these errors were encountered: