Class: Valorant::MatchStats

Inherits:
Object
  • Object
show all
Defined in:
lib/api/match.rb

Overview

This class is used to fetch data from the Valorant API -> ENDPOINTS: /match, /matches

Class Method Summary collapse

Class Method Details

.match_data(match_id) ⇒ Object



10
11
12
# File 'lib/api/match.rb', line 10

def self.match_data(match_id)
  Match.new(fetch_resposne("v2/match/#{match_id}"))
end

.matches_history(name, tag, region = 'eu', filter: '') ⇒ Object



14
15
16
# File 'lib/api/match.rb', line 14

def self.matches_history(name, tag, region = 'eu', filter: '')
  MatcheshHistory.new(fetch_resposne("v3/matches/#{region}/#{name}/#{tag}?filter=#{validate_filter(filter)}"))
end

.matches_history_by_puuid(puuid, region = 'eu', filter: '') ⇒ Object



18
19
20
# File 'lib/api/match.rb', line 18

def self.matches_history_by_puuid(puuid, region = 'eu', filter: '')
  MatcheshHistory.new(fetch_resposne("v3/by-puuid/matches/#{region}/#{puuid}?filter=#{validate_filter(filter)}"))
end