class Bnet::API
Attributes
region[RW]
FIXME : get the API
to append the :key param to the end of each ‘get’ call
Public Class Methods
new(args)
click to toggle source
# File lib/bnet/api.rb, line 6 def initialize args args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end
valid_call?(status, response)
click to toggle source
# File lib/bnet/api.rb, line 16 def self.valid_call?(status, response) status == ['200', 'OK'] && response["code"] != 'NOTFOUND' end
Public Instance Methods
url()
click to toggle source
# File lib/bnet/api.rb, line 12 def url "https://#{region}.api.battle.net/" end