Sha256: 8142a44e6ff897e6afd2cfc4d1042c62f15f9660b10ab67b5079f47d4f3e464b

Contents?: true

Size: 827 Bytes

Versions: 18

Compression:

Stored size: 827 Bytes

Contents

require_relative 'base'
module Taric
  module Operation
    module Stats
      include Taric::Operation::Base

      STATS_VERSION = 'v1.3'.freeze
      BASE_STATS_URL = "#{BASE_URL_FN.(STATS_VERSION)}/stats/by-summoner/{summonerId}"
      RANKED = Addressable::Template.new "#{BASE_STATS_URL}/ranked{?api_key,season}"
      SUMMARY = Addressable::Template.new "#{BASE_STATS_URL}/summary{?api_key,season}"

      # @see https://developer.riotgames.com/api/methods#!/961/3297
      def ranked_stats(summoner_id: , season: nil)
        response_for RANKED, {summonerId: summoner_id, season: season}
      end

      # @see https://developer.riotgames.com/api/methods#!/961/3298
      def summary_stats(summoner_id: , season: nil)
        response_for SUMMARY, {summonerId: summoner_id, season: season}
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
taric-0.3.4 lib/taric/operation/stats.rb
taric-0.3.3 lib/taric/operation/stats.rb
taric-0.3.1 lib/taric/operation/stats.rb
taric-0.3.0 lib/taric/operation/stats.rb
taric-0.2.4 lib/taric/operation/stats.rb
taric-0.2.2 lib/taric/operation/stats.rb
taric-0.2.1 lib/taric/operation/stats.rb
taric-0.2.0 lib/taric/operation/stats.rb
taric-0.1.14 lib/taric/operation/stats.rb
taric-0.1.13 lib/taric/operation/stats.rb
taric-0.1.12 lib/taric/operation/stats.rb
taric-0.1.11 lib/taric/operation/stats.rb
taric-0.1.10 lib/taric/operation/stats.rb
taric-0.1.9 lib/taric/operation/stats.rb
taric-0.1.8 lib/taric/operation/stats.rb
taric-0.1.7 lib/taric/operation/stats.rb
taric-0.1.6 lib/taric/operation/stats.rb
taric-0.1.5 lib/taric/operation/stats.rb