Class: Lol::MatchRequest
Overview
Bindings for the Match API.
Instance Attribute Summary
Attributes inherited from Request
#api_key, #cache_store, #rate_limiter, #region
Instance Method Summary collapse
-
#all(options = {}, account_id:) ⇒ DynamicModel
Get matchlist for ranked games played on given account ID and platform ID and filtered using given filter parameters, if any.
-
#find(options = {}, match_id:) ⇒ DynamicModel
Get match by match ID.
-
#find_by_tournament(match_id, tournament_code) ⇒ DynamicModel
Get match by match ID and tournament code.
-
#find_timeline(match_id) ⇒ DynamicModel
Get match timeline by match ID.
-
#ids_by_tournament_code(tournament_code) ⇒ Array<Integer>
Get match IDs by tournament code.
-
#recent(account_id:) ⇒ DynamicModel
Get matchlist for last 20 matches played on given account ID and platform ID.
Methods inherited from Request
#api_base_url, #api_query_string, #api_url, #api_version, api_version, #cached?, #clean_url, #initialize, #perform_rate_limited_request, #perform_request, #perform_uncached_request, #platform, platforms, #store, #ttl
Constructor Details
This class inherits a constructor from Lol::Request
Instance Method Details
#all(options = {}, account_id:) ⇒ DynamicModel
Get matchlist for ranked games played on given account ID and platform ID and filtered using given filter parameters, if any.
53 54 55 |
# File 'lib/lol/match_request.rb', line 53 def all ={}, account_id: DynamicModel.new perform_request api_url "matchlists/by-account/#{account_id}", end |
#find(options = {}, match_id:) ⇒ DynamicModel
Get match by match ID.
16 17 18 |
# File 'lib/lol/match_request.rb', line 16 def find ={}, match_id: DynamicModel.new perform_request api_url "matches/#{match_id}", end |
#find_by_tournament(match_id, tournament_code) ⇒ DynamicModel
Get match by match ID and tournament code.
38 39 40 |
# File 'lib/lol/match_request.rb', line 38 def find_by_tournament match_id, tournament_code DynamicModel.new perform_request api_url "matches/#{match_id}/by-tournament-code/#{tournament_code}" end |
#find_timeline(match_id) ⇒ DynamicModel
Get match timeline by match ID.
23 24 25 |
# File 'lib/lol/match_request.rb', line 23 def find_timeline match_id DynamicModel.new perform_request api_url "timelines/by-match/#{match_id}" end |
#ids_by_tournament_code(tournament_code) ⇒ Array<Integer>
Get match IDs by tournament code.
30 31 32 |
# File 'lib/lol/match_request.rb', line 30 def ids_by_tournament_code tournament_code perform_request api_url "matches/by-tournament-code/#{tournament_code}/ids" end |
#recent(account_id:) ⇒ DynamicModel
Get matchlist for last 20 matches played on given account ID and platform ID.
60 61 62 |
# File 'lib/lol/match_request.rb', line 60 def recent account_id: DynamicModel.new perform_request api_url "matchlists/by-account/#{account_id}/recent" end |