class BlizzardApi::Starcraft::Legacy

This class allows access to Starcraft II legacy data

@see develop.battle.net/documentation/api-reference/starcraft-2-game-data-api

You can get an instance of this class using the default region as follows:

api_instance = BlizzardApi::Starcraft.legacy

Public Instance Methods

achievements(region_id, **options) click to toggle source

Achievement data

@!macro sc2_regions @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 69
def achievements(region_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/data/achievements/#{reg}", **opts
end
ladder(region_id, ladder_id, **options) click to toggle source

Ladder

@!macro sc2_regions @param [Integer] ladder_id Ladder ID @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 58
def ladder(region_id, ladder_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/ladder/#{reg}/#{ladder_id}", **opts
end
ladders(region_id, realm_id, profile_id, **options) click to toggle source

Ladders

@!macro sc2_regions @param [Integer] realm_id Realm ID @param [Integer] profile_id Profile ID @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 33
def ladders(region_id, realm_id, profile_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}/ladder ", **opts
end
match(region_id, realm_id, profile_id, **options) click to toggle source

Match History

@!macro sc2_regions @param [Integer] realm_id Realm ID @param [Integer] profile_id Profile ID @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 46
def match(region_id, realm_id, profile_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}/matches", **opts
end
profile(region_id, realm_id, profile_id, **options) click to toggle source

Profile data

@!macro sc2_regions @param [Integer] realm_id Realm ID @param [Integer] profile_id Profile ID @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 20
def profile(region_id, realm_id, profile_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}", **opts
end
rewards(region_id, **options) click to toggle source

Rewards data

@!macro sc2_regions @!macro request_options

# File lib/blizzard_api/starcraft/community/legacy.rb, line 80
def rewards(region_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/legacy/data/rewards/#{reg}", **opts
end