Sha256: ca562bf70437cc10a772cc8a55732c18d6e35baf75c80c2544d0518b820b5a6f

Contents?: true

Size: 684 Bytes

Versions: 1

Compression:

Stored size: 684 Bytes

Contents

module Lol
  class TeamRequest < Request
    # Returns the supported API version
    # @return [String] supported api version
    def self.api_version
      "v2.3"
    end

    # Retrieves the list of Teams for the given summoner
    # @return [Array] List of Team
    def get *summoner_ids
      returns = {}
      perform_request(api_url "team/by-summoner/#{summoner_ids.join(",")}").each do |s, t|
        returns[s] = t.map {|data| Team.new data}
      end
      returns
    end

    # Retrieves the Teams for the given Team ID
    # @return [Team]
    def getbyid team_id
      result = perform_request(api_url "team/#{team_id}")
      Team.new result[team_id]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-lol-0.9.18 lib/lol/team_request.rb