Module: BnetApi::SC2
Overview
All API methods relating to Starcraft II are contained in this module.
Instance Method Summary collapse
-
#achievements_data ⇒ Hash
Retrieves all achievements data.
-
#ladder(id) ⇒ Hash
Retrieves the ladder data for the ladder with the specified ID.
-
#match_history(id, region, name) ⇒ Hash
Retrieves the match history for the specified profile.
-
#profile(id, region, name) ⇒ Hash
Retrieves the profile for specified user.
-
#profile_ladders(id, region, name) ⇒ Hash
Retrieves the ladders a profile is in.
-
#rewards_data ⇒ Hash
Retrieves all rewards data.
Instance Method Details
#achievements_data ⇒ Hash
Retrieves all achievements data.
48 49 50 |
# File 'lib/bnet_api/sc2.rb', line 48 def achievements_data BnetApi.make_request('/sc2/data/achievements') end |
#ladder(id) ⇒ Hash
Retrieves the ladder data for the ladder with the specified ID.
42 43 44 |
# File 'lib/bnet_api/sc2.rb', line 42 def ladder(id) BnetApi.make_request("/sc2/ladder/#{id}") end |
#match_history(id, region, name) ⇒ Hash
Retrieves the match history for the specified profile.
34 35 36 |
# 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) ⇒ Hash
Retrieves the profile for specified user.
14 15 16 |
# 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) ⇒ Hash
Retrieves the ladders a profile is in.
24 25 26 |
# 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 ⇒ Hash
Retrieves all rewards data.
54 55 56 |
# File 'lib/bnet_api/sc2.rb', line 54 def rewards_data BnetApi.make_request('/sc2/data/rewards') end |