Sha256: 35b64ce363d789083453e50a47a33e28d27fd1ab908d8bc2daf8b63474672b79

Contents?: true

Size: 771 Bytes

Versions: 1

Compression:

Stored size: 771 Bytes

Contents

require_relative 'base'
module Taric
  module Operation
    module Game
      include Taric::Operation::Base

      GAME_VERSION = 'v1.3'.freeze
      RECENT = Addressable::Template.new "#{BASE_URL_FN.(GAME_VERSION)}/game/by-summoner/{summonerId}/recent{?api_key}"

      # Returns [Hash] of recent game data for summoner id in an [Array] keyed by 'games'
      #
      # @see {https://developer.riotgames.com/api/methods#!/959/3291}
      # @param summoner_id [Fixnum] required, id of summoner
      # @return [Hash] of recent game data for summoner id
      #
      # @example
      #   recent_games = client.recent_game(summoner_id: 21066)['games']
      def recent_games(summoner_id:)
        response_for RECENT, {summonerId: summoner_id}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
taric-0.1.2 lib/taric/operation/game.rb