Class: Lol::SpectatorRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/lol/spectator_request.rb

Overview

Bindings for the Match API.

See: developer.riotgames.com/api-methods/#match-v3

Instance Attribute Summary

Attributes inherited from Request

#api_key, #cache_store, #rate_limiter, #region

Instance Method Summary collapse

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.

Parameters:

  • summoner_id (Integer)

    Summoner ID

Returns:



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

Get list of featured games.

Returns:



20
21
22
# File 'lib/lol/spectator_request.rb', line 20

def featured_games
  FeaturedGameList.new perform_request api_url "featured-games"
end