Class: Ryze::MatchResource
- Defined in:
- lib/Ryze/resources/match.rb
Overview
MatchResource is a class corresponding to the MatchV5 Riot API endpoint.
Constant Summary collapse
- BASE_URL =
"https://europe.api.riotgames.com/lol/match/v5"
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#retrieve_match(match_id:) ⇒ Match
Retrieve a match by match ID.
-
#retrieve_match_list_by_puuid(puuid:, **params) ⇒ Array<String>
Retrieve a match list by account puuid.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Ryze::Resource
Instance Method Details
#retrieve_match(match_id:) ⇒ Match
Retrieve a match by match ID.
12 13 14 |
# File 'lib/Ryze/resources/match.rb', line 12 def retrieve_match(match_id:) Match.new get_request("#{BASE_URL}/matches/#{match_id}").body end |
#retrieve_match_list_by_puuid(puuid:, **params) ⇒ Array<String>
Retrieve a match list by account puuid.
21 22 23 |
# File 'lib/Ryze/resources/match.rb', line 21 def retrieve_match_list_by_puuid(puuid:, **params) Array.new get_request("#{BASE_URL}/matches/by-puuid/#{puuid}/ids", params: params).body end |