PokeGOAPI-Java icon indicating copy to clipboard operation
PokeGOAPI-Java copied to clipboard

Getting empty CatchablePokemon List

Open David6390 opened this issue 10 years ago • 7 comments

Im getting empty list of CatchablePokemon when i do the following: go.getMap().getMapObjects(9).getCatchablePokemons()

It is strange cause there are Pokemon where im looking for. Also no Exceptions, only empty list.

Version: Im using "com.pokegoapi:library:0.3"

David6390 avatar Aug 03 '16 08:08 David6390

Niantic changed the time between getMapObjects again from 5 to 10 seconds :|

Grover-c13 avatar Aug 03 '16 10:08 Grover-c13

Really? Im doing like 25 calls to getCatchablePokemons(), is there any solution to this?

David6390 avatar Aug 03 '16 14:08 David6390

ive updated the API to address it. 0.3.3 onwards

Grover-c13 avatar Aug 03 '16 14:08 Grover-c13

Do i have to do something special in my code? or it is handled by the API?

David6390 avatar Aug 03 '16 14:08 David6390

handled by the API, it will retain a copy of map objects for 10 seconds and then on the next request get a fresh copy.

Grover-c13 avatar Aug 03 '16 14:08 Grover-c13

Ok thanks!

EDIT: when i make the calls, they go all in a loop with no time to wait between them, im still getting no pokes. But if i add a 10 seconds sleep, it works as expected.

Does it mean that i have to manage the time between calls myself?

David6390 avatar Aug 03 '16 14:08 David6390

@David6390 its your loop. You have to wait 10sec inside the loop.

FabianTerhorst avatar Aug 03 '16 15:08 FabianTerhorst