Class: BlizzardApi::Starcraft::Legacy
- Defined in:
- lib/blizzard_api/starcraft/community/legacy.rb
Overview
This class allows access to Starcraft II legacy data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Starcraft.legacy
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
-
#achievements(region_id, **options) ⇒ Object
Achievement data.
-
#ladder(region_id, ladder_id, **options) ⇒ Object
Ladder.
-
#ladders(region_id, realm_id, profile_id, **options) ⇒ Object
Ladders.
-
#match(region_id, realm_id, profile_id, **options) ⇒ Object
Match History.
-
#profile(region_id, realm_id, profile_id, **options) ⇒ Object
Profile data.
-
#rewards(region_id, **options) ⇒ Object
Rewards data.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Starcraft::Request
Instance Method Details
#achievements(region_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Achievement data
69 70 71 72 73 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 69 def achievements(region_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/data/achievements/#{reg}", **opts end |
#ladder(region_id, ladder_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Ladder
58 59 60 61 62 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 58 def ladder(region_id, ladder_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/ladder/#{reg}/#{ladder_id}", **opts end |
#ladders(region_id, realm_id, profile_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Ladders
33 34 35 36 37 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 33 def ladders(region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}/ladder ", **opts end |
#match(region_id, realm_id, profile_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Match History
46 47 48 49 50 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 46 def match(region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}/matches", **opts end |
#profile(region_id, realm_id, profile_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Profile data
20 21 22 23 24 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 20 def profile(region_id, realm_id, profile_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}", **opts end |
#rewards(region_id, **options) ⇒ Object
Note:
This gem do not support nor will support China endpoints
Rewards data
80 81 82 83 84 |
# File 'lib/blizzard_api/starcraft/community/legacy.rb', line 80 def rewards(region_id, **) reg = resolve_region(region_id) opts = { ttl: CACHE_DAY }.merge() api_request "#{base_url(:community)}/legacy/data/rewards/#{reg}", **opts end |