Sha256: 7e0ea7c005846cb57f4fdd2fe55a994958acdb0f75769d254d7c97e96084d53c

Contents?: true

Size: 913 Bytes

Versions: 2

Compression:

Stored size: 913 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
taric-1.0.0.pre.beta.0 lib/taric/operation/spectator.rb
taric-1.0.0.pre.alpha.8 lib/taric/operation/spectator.rb