tejado / pgoapi

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

Add heartbeat #47

Closed elicwhite closed 8 years ago

elicwhite commented 8 years ago

Some of the downstream projects include a heartbeat function that would be great to find a way to pull it into this upstream.

For example: https://github.com/leegao/pokemongo-api-demo/blob/simulation/main.py#L198

Cl0v1s commented 8 years ago

What does it do actually ? :)

elicwhite commented 8 years ago

I'm not 100%, but typically a heartbeat is used to keep a session alive. So if you signed in, and didn't have any additional requests within a certain time period, the server would sign kill the session. A heartbeat is typically a special endpoint that is called to tell the server you are still there and not to kill the session.

But I'm just making an assumption on the behavior in this specific case based on the naming. Perhaps @leegao has more thoughts.

tejado commented 8 years ago

Actually, the method is doing the complete get_map_object request with some additional stuff. The additional stuff seems to be the heartbeat, also described here: https://www.reddit.com/r/pokemongodev/comments/4tn3lm/the_heartbeats/

I will check it :)

Nostrademous commented 8 years ago

the heartbeat is the same thing as get_map_objects request AFAIK .... just people called it heartbeat...