Class: MetaNexus::Sc2::Ladder
- Inherits:
-
MetaNexus::Sc2
- Object
- Api
- MetaNexus::Sc2
- MetaNexus::Sc2::Ladder
- Defined in:
- lib/meta_nexus/sc2/ladder.rb
Class Method Summary collapse
-
.ladder(id) ⇒ Object
Find Sc2 Ladder info in Battle.net StarCraft 2 Api Required arguments: id - Ladder id.
Methods inherited from MetaNexus::Sc2
Methods inherited from Api
Class Method Details
.ladder(id) ⇒ Object
Find Sc2 Ladder info in Battle.net StarCraft 2 Api Required arguments: id - Ladder id
Example:
sc2 = MetaNexus::Sc2::Ladder.new('eu', 'ru_RU', 'api_key')
sc2.ladder(2200)
Response in Hash will contain huge data about top players on ladder.
13 14 15 16 |
# File 'lib/meta_nexus/sc2/ladder.rb', line 13 def self.ladder(id) call_url = "#{client.url}/ladder/#{id}?locale=#{MetaNexus.config.locale}&apikey=#{MetaNexus.config.api_key}" MetaNexus::Api.call_api(call_url) end |