chadrem/market_bot — pull request #12 by guss77 (2013-05-03 22:04:28+00:00)
Title: added support for passing a callback to Leaderboard#enqueue_update

Leaderboard#enqueue_update doesn't support passing a code block that will be called with the leaderboard has finished updating. The problem is that unlike App that has this feature, Leaderboard does multiple queries and the callback should be run only once.

This patch implements the required functionality by keeping track of all the pages that should be read from the leaderboard and firing the callback only when all pages have been loaded.