Sha256: 1eca729c9327eacf3ff02f93fb639ae886325197c72374404778384cdb8b40d3
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
module Lol class Client # @!attribute [rw] region # @return [String] name of region attr_accessor :region # @!attribute [r] api_key # @return [String] the API key that has been used attr_reader :api_key # @return [ChampionRequest] def champion @champion_request ||= ChampionRequest.new(api_key, region) end # @return [GameRequest] def game @game_request ||= GameRequest.new(api_key, region) end # @return [StatsRequest] def stats @stats_request ||= StatsRequest.new(api_key, region) end # @return [LeagueRequest] def league @league_request ||= LeagueRequest.new(api_key, region) end # @return [TeamRequest] def team @team_request ||= TeamRequest.new(api_key, region) end # @return [SummonerRequest] def summoner @summoner_request ||= SummonerRequest.new(api_key, region) end # Initializes a Lol::Client # @param api_key [String] # @param options [Hash] # @option options [String] :region ("EUW") The region on which the requests will be made # @return [Lol::Client] def initialize api_key, options = {} @api_key = api_key @region = options.delete(:region) || "euw" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-lol-0.9.9 | lib/lol/client.rb |
ruby-lol-0.9.8 | lib/lol/client.rb |
ruby-lol-0.9.7 | lib/lol/client.rb |
ruby-lol-0.9.6 | lib/lol/client.rb |