module BnetApi::SC2

All API methods relating to Starcraft II are contained in this module.

Public Instance Methods

achievements_data() click to toggle source

Retrieves all achievements data. @return [Hash] A hash containing the achievements data.

# File lib/bnet_api/sc2.rb, line 48
def achievements_data
  BnetApi.make_request('/sc2/data/achievements')
end
ladder(id) click to toggle source

Retrieves the ladder data for the ladder with the specified ID.

@param id [String] The ID of the ladder. @return [Hash] A hash containing the ladder data.

# File lib/bnet_api/sc2.rb, line 42
def ladder(id)
  BnetApi.make_request("/sc2/ladder/#{id}")
end
match_history(id, region, name) click to toggle source

Retrieves the match history for the specified profile.

@param id [Integer] The user's profile ID. @param region [Integer] The region the user is in. @param name [String] The name of the user's profile. @return [Hash] A hash containing the profile's match history data.

# File lib/bnet_api/sc2.rb, line 34
def match_history(id, region, name)
  BnetApi.make_request("/sc2/profile/#{id}/#{region}/#{name}/matches")
end
profile(id, region, name) click to toggle source

Retrieves the profile for specified user.

@param id [Integer] The user's profile ID. @param region [Integer] The region the user is in. @param name [String] The name of the user's profile. @return [Hash] A hash containing the profile data.

# File lib/bnet_api/sc2.rb, line 14
def profile(id, region, name)
  BnetApi.make_request("/sc2/profile/#{id}/#{region}/#{name}/")
end
profile_ladders(id, region, name) click to toggle source

Retrieves the ladders a profile is in.

@param id [Integer] The user's profile ID. @param region [Integer] The region the user is in. @param name [String] The name of the user's profile. @return [Hash] A hash containing the profile's ladder data.

# File lib/bnet_api/sc2.rb, line 24
def profile_ladders(id, region, name)
  BnetApi.make_request("/sc2/profile/#{id}/#{region}/#{name}/ladders")
end
rewards_data() click to toggle source

Retrieves all rewards data. @return [Hash] A hash containing the rewards data.

# File lib/bnet_api/sc2.rb, line 54
def rewards_data
  BnetApi.make_request('/sc2/data/rewards')
end