Sha256: 377f3cc9f5bf992b47919df88e68aa8f3216445fb53ff1dce7582e33443154a7

Contents?: true

Size: 1.11 KB

Versions: 9

Compression:

Stored size: 1.11 KB

Contents

require_relative 'base'
require_relative 'endpoint_template'
module Taric
  module Operation
    module Team
      include Taric::Operation::Base

      TEAM_VERSION = 'v2.4'.freeze
      BASE_TEAM_URL = "#{BASE_URL_FN.(TEAM_VERSION)}/team"

      TEAMS_BY_SUMMONER_IDS =  EndpointTemplate.new(template_url: "#{BASE_TEAM_URL}/by-summoner/{summonerIds}")
      TEAMS_BY_TEAM_IDS =  EndpointTemplate.new(template_url: "#{BASE_TEAM_URL}/{teamIds}")

      # Teams by summoner ids.
      #
      # @param summoner_ids [String] comma separated list of summoner ids
      # @return [Hash] team info by summoner id
      # @see https://developer.riotgames.com/api/methods#!/986/3358
      def teams_by_summoner_ids(summoner_ids:)
        response_for TEAMS_BY_SUMMONER_IDS, {summonerIds: summoner_ids}
      end

      # Teams by team ids.
      #
      # @param team_ids [String] comma separated list of team ids
      # @return [Hash] team info by team IDs
      # @see https://developer.riotgames.com/api/methods#!/986/3357
      def teams(team_ids:)
        response_for TEAMS_BY_TEAM_IDS, {teamIds: team_ids}
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
taric-1.0.0.pre.alpha.8 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha.6 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha.4 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha.3 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha.2 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha.1 lib/taric/operation/team.rb
taric-1.0.0.pre.alpha lib/taric/operation/team.rb
taric-0.5.1 lib/taric/operation/team.rb
taric-0.5.0 lib/taric/operation/team.rb