Class: Valorant::MMRStats

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

Overview

This class is used to fetch data from the Valorant API -> ENDPOINTS: /mmr, /by-puuid/mmr/, v1/mmr-history/, v1/by-puuid/mmr-history/

Class Method Summary collapse

Class Method Details

.mmr_data(name, tag, region = 'eu', version: 'v1') ⇒ Object



11
12
13
# File 'lib/api/mmr.rb', line 11

def self.mmr_data(name, tag, region = 'eu', version: 'v1')
  MMRV1.new(fetch_resposne("#{version}/mmr/#{region}/#{name}/#{tag}"))
end

.mmr_data_by_puuid(puuid, region = 'eu', version: 'v1') ⇒ Object



15
16
17
# File 'lib/api/mmr.rb', line 15

def self.mmr_data_by_puuid(puuid, region = 'eu', version: 'v1')
  MMRV1.new(fetch_resposne("#{version}/by-puuid/mmr/#{region}/#{puuid}"))
end

.mmr_history(name, tag, region = 'eu') ⇒ Object



19
20
21
# File 'lib/api/mmr.rb', line 19

def self.mmr_history(name, tag, region = 'eu')
  MMRHistory.new(fetch_resposne("v1/mmr-history/#{region}/#{name}/#{tag}"))
end

.mmr_history_by_puuid(puuid, region = 'eu') ⇒ Object



23
24
25
# File 'lib/api/mmr.rb', line 23

def self.mmr_history_by_puuid(puuid, region = 'eu')
  MMRHistory.new(fetch_resposne("v1/by-puuid/mmr-history/#{region}/#{puuid}"))
end