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

How to map returned Pokemons with names

Open meher19 opened this issue 10 years ago • 7 comments

Hello,

this is my question : I found the pokemon names in this file : https://github.com/Grover-c13/PokeGOAPI-Java/blob/Development/classes/production/PokeGOAPI-Java/pokemon_names.properties

Now, how to map returned pokemons from method getCatcheablePokemons() with the integer ids in the properties file, i looked for a similar id in the PokemonData object but nothing.

Thanks.

meher19 avatar Aug 03 '16 06:08 meher19

I am assuming this method will get you the pokemon's number. cp.getPokemonId().getNumber();

a4andy avatar Aug 03 '16 07:08 a4andy

You can check class DisplayPokenameExample.java

john086 avatar Aug 03 '16 08:08 john086

@a4andy : thank you, i will look at this attribute. @john086 : i saw it, but this example is just displayng names from the properties file, it's not mapping with results returned from Niantic servers.

I have another related question : how i can get pokemon image, do this api provides an image library that we can map with each pokemon ? else how to do ?

Thanks.

meher19 avatar Aug 03 '16 08:08 meher19

@meher19 no is niantic server name , if i open app "Pokemon go" in Diary i see exactly the same name :+1:

john086 avatar Aug 03 '16 08:08 john086

@john086 : ok ! but this not responds to my last question...

meher19 avatar Aug 03 '16 09:08 meher19

@meher19 for image i don't know

john086 avatar Aug 03 '16 09:08 john086

we dont provide images, you can use various restful apis for it.

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