Sha256: 984f72b044eb58639bbd95f6da7c0d077ca4e3857c48b4b23c2f6bb36e998d94
Contents?: true
Size: 1.24 KB
Versions: 9
Compression:
Stored size: 1.24 KB
Contents
require_relative 'base' require_relative 'endpoint_template' 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 = EndpointTemplate.new(template_url: "#{BASE_STATS_URL}/ranked{?api_key,season}") SUMMARY = EndpointTemplate.new(template_url: "#{BASE_STATS_URL}/summary{?api_key,season}") # Ranked stats for summoner. # # @see https://developer.riotgames.com/api/methods#!/1018/3452 # @param summoner_id [Fixnum] ID of summoner # @param season [String] Optional - valid season # @return [Hash] ranked stats def ranked_stats(summoner_id: , season: nil) response_for RANKED, {summonerId: summoner_id, season: season} end # Summary stats for summoner. # # @see https://developer.riotgames.com/api/methods#!/1018/3453 # @param summoner_id [Fixnum] ID of summoner # @param season [String] Optional - valid season # @return [Hash] various aggregate stats def summary_stats(summoner_id: , season: nil) response_for SUMMARY, {summonerId: summoner_id, season: season} end end end end
Version data entries
9 entries across 9 versions & 1 rubygems