class BlizzardApi::Starcraft::Profile

This class allows access to Starcraft II profile 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.profile

Public Instance Methods

ladder(region_id, realm_id, profile_id, ladder_id, **options) click to toggle source

Ladder 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/profile.rb, line 69
def ladder(region_id, realm_id, profile_id, ladder_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}/ladder/#{ladder_id}", **opts
end
ladder_summary(region_id, realm_id, profile_id, **options) click to toggle source

Ladder summary

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

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

Metadata

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

# File lib/blizzard_api/starcraft/community/profile.rb, line 30
def metadata(region_id, realm_id, profile_id, **options)
  reg = resolve_region(region_id)
  opts = { ttl: CACHE_DAY }.merge(options)
  api_request "#{base_url(:community)}/metadata/profile/#{reg}/#{realm_id}/#{profile_id}", **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/profile.rb, line 43
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)}/profile/#{reg}/#{realm_id}/#{profile_id}", **opts
end
static(region_id, **options) click to toggle source

Static profile data

@!macro sc2_regions @!macro request_options

# File lib/blizzard_api/starcraft/community/profile.rb, line 18
def static(region_id, **options)
  reg = resolve_region(region_id)
  api_request "#{base_url(:community)}/static/profile/#{reg}", **{ ttl: CACHE_DAY }.merge(options)
end