Class: Lol::SpectatorRequest
- Defined in:
- lib/lol/spectator_request.rb
Overview
Bindings for the Match API.
Instance Attribute Summary
Attributes inherited from Request
#api_key, #cache_store, #rate_limiter, #region
Instance Method Summary collapse
-
#current_game(summoner_id:) ⇒ DynamicModel
Get current game information for the given summoner ID.
-
#featured_games ⇒ FeaturedGameList
Get list of featured games.
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
#current_game(summoner_id:) ⇒ DynamicModel
Get current game information for the given summoner ID.
14 15 16 |
# File 'lib/lol/spectator_request.rb', line 14 def current_game summoner_id: DynamicModel.new perform_request api_url "active-games/by-summoner/#{summoner_id}" end |
#featured_games ⇒ FeaturedGameList
Get list of featured games.
20 21 22 |
# File 'lib/lol/spectator_request.rb', line 20 def featured_games FeaturedGameList.new perform_request api_url "featured-games" end |