Sha256: 6cec0989833b37952775134702177b3124aad09ebe410f235ca3a8b4302778b1

Contents?: true

Size: 943 Bytes

Versions: 3

Compression:

Stored size: 943 Bytes

Contents

# frozen_string_literal: true
require_relative 'endpoint_template'
module Taric
  module Operation
    module Spectator
      CURRENT_GAME_V3 = EndpointTemplate.new(template_url: 'https://{host}/lol/spectator/v3/active-games/by-summoner/{summonerId}{?api_key}')
      FEATURED_GAMES_V3 = EndpointTemplate.new(template_url: 'https://{host}/lol/spectator/v3/featured-games{?api_key}')

      # Returns current game data for summoner id.
      #
      # @see https://developer.riotgames.com/api-methods/#spectator-v3/GET_getCurrentGameInfoBySummoner
      # @param summoner_id [Fixnum] ID of summoner
      # @return [Response] current game
      def current_game(summoner_id: )
        response_for CURRENT_GAME_V3, {summonerId: summoner_id}
      end

      #
      # @see https://developer.riotgames.com/api-methods/#spectator-v3/GET_getFeaturedGames
      def featured_games
        response_for FEATURED_GAMES_V3
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
taric-2.0.0.pre.alpha.1 lib/taric/operation/spectator.rb
taric-2.0.0.pre.alpha lib/taric/operation/spectator.rb
taric-1.0.0 lib/taric/operation/spectator.rb