Armax / Pokemon-GO-node-api

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

Added queueing/throttle system #236

Closed WesVleuten closed 7 years ago

WesVleuten commented 8 years ago

Added throttle system to remove the possibility to get your request dropped, this system is disabled by default and can be set by SetThrottle. A fix for issue #220

andreivreja commented 8 years ago

Nice. One thing you could add to that is per account queue. Assuming people won't spam requests too much, doing it per access token should work.

WesVleuten commented 8 years ago

The queue is for each instance so every account has its own queue

andreivreja commented 8 years ago

Yeah, my bad. I miss understood it because the way I use the API is logging accounts in before every request. I am doing this because, a few days ago, the throttle was not affecting me, since the last request time was not persistent between sessions.

Now I should consider keeping accounts logged in since there's no benefit in re-logging anymore. This queue will work just fine.

WesVleuten commented 8 years ago

Is there a particular reason why this hasn't been merged yet?