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

- (Game) initialize(connection, region)

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

- (Object) recent(summoner_id)

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