Class: BlizzardApi::Starcraft::Profile
- Defined in:
- lib/blizzard_api_rb/starcraft/community/profile.rb
Overview
This class allows access to Starcraft II profile data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Starcraft.profile
Constant Summary
Constants inherited from Request
Constants inherited from Request
Request::CACHE_DAY, Request::CACHE_HOUR, Request::CACHE_TRIMESTER
Constants included from ApiStandards
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#ladder(region_id, realm_id, profile_id, ladder_id, **options) ⇒ Object
Ladder data.
-
#ladder_summary(region_id, realm_id, profile_id, **options) ⇒ Object
Ladder summary.
-
#metadata(region_id, realm_id, profile_id, **options) ⇒ Object
Metadata.
-
#profile(region_id, realm_id, profile_id, **options) ⇒ Object
Profile data.
-
#static(region_id, **options) ⇒ Object
Static profile data.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Starcraft::Request
Instance Method Details
#ladder(region_id, realm_id, profile_id, ladder_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Ladder data
69 70 71 72 73 |
# File 'lib/blizzard_api_rb/starcraft/community/profile.rb', line 69 def ladder(region_id, realm_id, profile_id, ladder_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() 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) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Ladder summary
56 57 58 59 60 |
# File 'lib/blizzard_api_rb/starcraft/community/profile.rb', line 56 def ladder_summary(region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}profile/#{reg}/#{realm_id}/#{profile_id}/ladder/summary ", **opts end |
#metadata(region_id, realm_id, profile_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Metadata
30 31 32 33 34 |
# File 'lib/blizzard_api_rb/starcraft/community/profile.rb', line 30 def (region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/metadata/profile/#{reg}/#{realm_id}/#{profile_id}", **opts end |
#profile(region_id, realm_id, profile_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Profile data
43 44 45 46 47 |
# File 'lib/blizzard_api_rb/starcraft/community/profile.rb', line 43 def profile(region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}", **opts end |
#static(region_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Static profile data
18 19 20 21 |
# File 'lib/blizzard_api_rb/starcraft/community/profile.rb', line 18 def static(region_id, **) reg = resolve_region(region_id) api_request "#{base_url(:community)}/static/profile/#{reg}", **{ ttl: CACHE_DAY }.merge() end |