tejado / pgoapi

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

[question] New to API, a few questions #226

Closed hypixus closed 8 years ago

hypixus commented 8 years ago

Hello

I encountered a few questions whilst trying to analyze response of get_map_objects and when I got to:

(api set up as in pokecli.py) cell_ids = util.get_cell_ids(position[0], position[1]) timestamps = [0,] * len(cell_ids) response_dict = api.get_map_objects(latitude =position[0], longitude = position[1], since_timestamp_ms = timestamps, cell_id = cell_ids) catchable=[] for x in responsedict['responses']['GET_MAP_OBJECTS']['map_cells']: item=x.get('catchable_pokemon', None) if item is not None: catchable.append(item[0])

  1. I need example how to catch pokemon with data got like this(encounter_id, pokemon_id, spawnpoint_id, expiration timestamp and coordinates) I KNOW a function catch_pokemon does it, but its input values are diffrent from what I got :/
  2. there are catchable_pokemons and wild_pokemons. What's the diffrence?
  3. how to find pokestops and spin them with response dictionary? And same, some example pleeeease?

Huge thanks for someone who could anwser these questions.

kaikuchn commented 8 years ago

Have a look at https://github.com/PokemonGoF/PokemonGo-Bot/ they are actively using this API. There should be plenty of examples in that code.

But keep in mind, botting is against the TOS and it's not nice towards the community!

kaikuchn commented 8 years ago

Also check this comment for an explanation on the difference between wild and catchable pokemon. Btw. no offense but this was very easy to find out via google..

hypixus commented 8 years ago

@kaikuchn Thanks a lot! Finally I am able to do this properly. Of course, I set random values so I won't always catch(I'm not trying to cheat, just connected gps module to my raspberry pi and try to chatch some near my house). Googling it was a lot of problem - I don't have any computer or phone other than raspi, so googling anything is horrible... Closing issue.