Skip to content

Instantly share code, notes, and snippets.

@bbck
Created June 3, 2012 23:22
Show Gist options
  • Save bbck/2865396 to your computer and use it in GitHub Desktop.
Save bbck/2865396 to your computer and use it in GitHub Desktop.
Auction House Scan
api = Battlenet.new(:us)
api.realm["realms"].each do |r|
begin
auctions = api.auction_data(r["name"])
%w(alliance horde).each do |f|
puts "Processing #{auctions["realm"]["name"]} #{f}"
auctions[f]["auctions"].each { |a| Resque.enqueue CharacterJob, "us", auctions["realm"]["name"], a["owner"] }
end
ensure
next
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment