class RiotGamesApi::LOL::Resource::Game
Public Class Methods
new(connection, region)
click to toggle source
Calls superclass method
RiotGamesApi::LOL::Resource::Base::new
# File lib/riot_games_api/lol/resource/game.rb, line 5 def initialize(connection, region) super @version = 'v1.3' end
Public Instance Methods
recent(summoner_id)
click to toggle source
Return recent games by summoner id @param [String, Integer] summoner_id @return RecentGame model
# 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
Private Instance Methods
resource_path(summoner_id)
click to toggle source
# File lib/riot_games_api/lol/resource/game.rb, line 20 def resource_path(summoner_id) "game/by-summoner/#{summoner_id}/recent" end