The game library for HTTP Attack.

Item Protocol


Initializer must take two parameters, a username and an optional hash of settings.

SomeItem.new('luser', :set_this => 'to_this')

The Item must override the following methods:

stat


This method should return an Integer (or maybe a Float), which will be used to determine the Item strength.

def stat
  stats['user']['followers_count'].to_i
end

stats_url


Should return a string which returns the remote API response for the Item. Currently supports JSON.

def stats_url
  URI.parse("http://example.com/users/luser.json").to_s
end