Sha256: 4469bd9d88180d8988e8d3071d48b2519c4cbdf4ff7b9a1f561a1a60325e6d85

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

module Lol
  class GameRequest < Request
    # Returns the supported API Version
    # @return [String] the supported api version
    def self.api_version
      "v1.2"
    end

    # Returns a list of the recent games played by a summoner
    # @param summoner_id [Fixnum] Summoner id
    # @return [Array] an array of games
    def recent summoner_id
      summoner_api_path = "game/by-summoner/#{summoner_id}/recent"
      perform_request(api_url(summoner_api_path))["games"].map do |game_data|
        Game.new game_data
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-lol-0.9.5 lib/lol/game_request.rb
ruby-lol-0.9.4 lib/lol/game_request.rb
ruby-lol-0.9.3 lib/lol/game_request.rb