Number of Gyms conquered?
Do you know if I can get the number of the current gyms conquered? Thank you very much!
What do you mean by "current" gyms conquered? As in gyms you currently defend?
* @method int getBattleAttackWon()
* @method int getBattleAttackTotal()
* @method int getBattleDefendedWon()
* @method int getBattleTrainingWon()
* @method int getBattleTrainingTotal()
Those methods are global stats. He is probably looking for the number that shows in game on the shop that decides how many pokecoins you can get if you claim them now. It might be somewhere under the "DailyDefenderBonus" protos, but I can't pinpoint it right now ...
Yes @Ni42 exactly!
One way of achieving it, probably not the best way.
$deployedPokemons = $pokebank->getPokemons()->filter(function (Pokemon $pokemon) {
return $pokemon->isDeployed();
});
$numberOfDeployedPokemons = count($deployedPokemons);
I tried it but does not work!