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
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
@!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
@!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
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 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