Armax / Pokemon-GO-node-api

Pokemon GO api node.js library
MIT License
875 stars 198 forks source link

Fix the heartbeat #205

Closed Luzifix closed 8 years ago

Luzifix commented 8 years ago

Hey,

can anyone fix the Heartbeat. On reddit is the new code in Python public https://www.reddit.com/r/pokemongodev/comments/4w1cvr/pokemongo_current_api_status/

BlackWolf commented 8 years ago

It seems they published a new version of the PGO API (for Python) here: https://github.com/keyphact/pgoapi/tree/master/pgoapi

But since the node API seems to be a port of the python API I suppose it will take a while to convert it

WesVleuten commented 8 years ago

It would be in our best interest to make this top priority

Nico-Nico-FR commented 8 years ago

Hello, anyone can convert PGO api Python into PGO api Node please?

dnnspaul commented 8 years ago

Calm down guys, the API were just cracked.

SpencerSharkey commented 8 years ago

working on this

Nico-Nico-FR commented 8 years ago

Thank you guys ! You're awesome

Luzifix commented 8 years ago

Thx :)

dnnspaul commented 8 years ago

FYI, updates: https://discordapp.com/channels/208930747044724737/208930747044724737

starkevin commented 8 years ago

@DatN3xus You sure that's right? Seems empty...

dnnspaul commented 8 years ago

Go in and ask Spencer for an update, you'll see :)

starkevin commented 8 years ago

No, I mean it takes you to an empty Discord channel.

SpencerSharkey commented 8 years ago

submitted a PR for this: https://github.com/Armax/Pokemon-GO-node-api/pull/207

Nico-Nico-FR commented 8 years ago

Thank you SpencerSharkey !

SpencerSharkey commented 8 years ago

the only problem I can see that's left to fix up is the auth_ticket expiration. let me know if any of you run a client for 30+ mins and experience a logout/forbidden

starkevin commented 8 years ago

@SpencerSharkey Thanks for that. I got pretty close myself using your node-pogo-signature library, but missed that it's auth_ticket now, not auth_token.

Good work mate. :+1:

SpencerSharkey commented 8 years ago

It still uses the auth_info message for the initial call to provoke a response with auth_ticket, which should be used for subsequent requests until it expires. Once expired send the auth_info message again and repeat.

reecube commented 8 years ago

@SpencerSharkey Very good work, thanks a lot! Do you know how long the auth_ticket is valid until it expires?

lukasolson commented 8 years ago

Thanks @SpencerSharkey! You rock. Can we republish to NPM?

SpencerSharkey commented 8 years ago

@reecube I think it's around 30 minutes... looking into auto-renewal atm.

williamokano commented 8 years ago

The heartbeat is now getting the nearby pokemons?

I only got empty lists for forts and nearby pokemons.

delmotte commented 8 years ago

the same for me

SpencerSharkey commented 8 years ago

until there's an npm release you'll have to manually install the module via the git url: npm install --save https://github.com/Armax/Pokemon-GO-node-api.git

starkevin commented 8 years ago

@williamokano @delmotte Are you using PTC accounts? Make sure you've accepted the terms.

You'll need to clone this repo until @Armax pushes to NPM.

avatsaev commented 8 years ago

there is still something wrong with it, i often get empty responses with this version: tested with this implementation: https://github.com/avatsaev/pokego-scan-api

wild_pokemon and map_pokemon are very often empty, wild_pokemon being the most important data because it contains coordinates and the timers

BlackWolf commented 8 years ago

just as a sidenote, there seems to be a limit on how often you can do heartbeats. For me, if I query more often than every 5 seconds, I get either empty responses or heartbeat errors. Just saying :-)

starkevin commented 8 years ago

The scan time is 5 seconds. Anything lower returns nothing.