Class: Starcall::Endpoints::SummonerV4

Inherits:
Object
  • Object
show all
Defined in:
lib/starcall/endpoints/summoner_v4.rb

Overview

Methods used to get information about summoners.

Class Method Summary collapse

Class Method Details

.by_account_id(encrypted_account_id:, region:) ⇒ Object

Get a summoner by account ID.



11
12
13
14
15
16
17
# File 'lib/starcall/endpoints/summoner_v4.rb', line 11

def self.(encrypted_account_id:, region:)
  Starcall::Regions.valid?(region: region)
  Starcall::ApiRequests.make_request(
    url: "https://#{parse_region(region: region)}.api.riotgames.com"\
         "/lol/summoner/v4/summoners/by-account/#{}"
  )
end

.by_puuid(puuid:, region:) ⇒ Object

Get a summoner by PUUID.



29
30
31
32
33
34
35
# File 'lib/starcall/endpoints/summoner_v4.rb', line 29

def self.by_puuid(puuid:, region:)
  Starcall::Regions.valid?(region: region)
  Starcall::ApiRequests.make_request(
    url: "https://#{parse_region(region: region)}.api.riotgames.com"\
         "/lol/summoner/v4/summoners/by-puuid/#{puuid}"
  )
end

.by_summoner_id(summoner_id:, region:) ⇒ Object

Get a summoner by summoner ID.



38
39
40
41
42
43
44
# File 'lib/starcall/endpoints/summoner_v4.rb', line 38

def self.by_summoner_id(summoner_id:, region:)
  Starcall::Regions.valid?(region: region)
  Starcall::ApiRequests.make_request(
    url: "https://#{parse_region(region: region)}.api.riotgames.com"\
         "/lol/summoner/v4/summoners/#{summoner_id}"
  )
end

.by_summoner_name(summoner_name:, region:) ⇒ Object

Get a summoner by summoner name.



20
21
22
23
24
25
26
# File 'lib/starcall/endpoints/summoner_v4.rb', line 20

def self.by_summoner_name(summoner_name:, region:)
  Starcall::Regions.valid?(region: region)
  Starcall::ApiRequests.make_request(
    url: "https://#{parse_region(region: region)}.api.riotgames.com"\
         "/lol/summoner/v4/summoners/by-name/#{summoner_name}"
  )
end