Sha256: 32e5d7f3b4ba3a255d0f224a6292ae044cbe8a17ac9c8022a80519102c49c47a

Contents?: true

Size: 544 Bytes

Versions: 4

Compression:

Stored size: 544 Bytes

Contents

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

    # Retrieves leagues data for summoner, including leagues for all of summoner's teams, v2.1
    # @return [Array] an array of champions
    def get summoner_id
      response = perform_request(api_url("league/by-summoner/#{summoner_id}"))[summoner_id.to_s]
      response.is_a?(Hash) ? [League.new(response)] : response.map {|l| League.new l}
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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