Class: OpenDotaApi::Explorer

Inherits:
Entity
  • Object
show all
Defined in:
lib/open_dota_api/explorer.rb

Constant Summary collapse

ENDPOINT =
'explorer'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

define_adder, #initialize

Methods included from OpenDotaApi::Entities::Instantiatable

included

Constructor Details

This class inherits a constructor from OpenDotaApi::Entity

Class Method Details

.instantiate(_ = nil) ⇒ Object

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/open_dota_api/explorer.rb', line 7

def self.instantiate(_ = nil)
  raise NotImplementedError
end

.query_params(league_id) ⇒ Object



11
12
13
14
15
# File 'lib/open_dota_api/explorer.rb', line 11

def self.query_params(league_id)
  {
    sql: "SELECT matches.match_id FROM matches WHERE matches.leagueid = #{league_id} ORDER BY matches.match_id LIMIT 20000"
  }
end

Instance Method Details

#league_matches_idsObject



17
18
19
# File 'lib/open_dota_api/explorer.rb', line 17

def league_matches_ids
  data['rows'].map { |obj| obj['match_id'] }
end