Class: RiotGamesApi::LOL::Resource::Game

Inherits:
Base
  • Object
show all
Defined in:
lib/riot_games_api/lol/resource/game.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection, region) ⇒ Game

Returns a new instance of Game.



5
6
7
8
# File 'lib/riot_games_api/lol/resource/game.rb', line 5

def initialize(connection, region)
  super
  @version = 'v1.3'
end

Instance Method Details

#recent(summoner_id) ⇒ Object

Return recent games by summoner id

Parameters:

  • summoner_id (String, Integer)

Returns:

  • RecentGame model



13
14
15
16
# File 'lib/riot_games_api/lol/resource/game.rb', line 13

def recent(summoner_id)
  recent_game = get(resource_path(summoner_id), @version)
  RiotGamesApi::LOL::Model::Game::RecentGame.new recent_game
end