Sha256: 1042ec4775d7285576fe6abceb9da86f1d7c61f6f1870bc32a7b2ba92db2d0bc

Contents?: true

Size: 700 Bytes

Versions: 8

Compression:

Stored size: 700 Bytes

Contents

require_relative 'endpoint_template'
module Taric
  module Operation
    module CurrentGame
      GAME_INFO = EndpointTemplate.new(template_url: 'https://{host}/observer-mode/rest/consumer/getSpectatorGameInfo/{platform_id}/{summonerId}{?api_key}')

      # Returns current game data for summoner id.
      #
      # @see https://developer.riotgames.com/api/methods#!/956/3287
      # @param summoner_id [Fixnum] required, id of summoner
      # @return [Hash] of game data for summoner id
      #
      # @example
      #   current_game = client.current_game(summoner_id: 21066)
      def current_game(summoner_id:)
        response_for GAME_INFO, summonerId: summoner_id
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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