<commit_before>module RiotGamesApi
  module LOL
    class Client
      def initialize(params = {})
        @api_key = params[:api_key] || ENV['RIOT_GAMES_API_KEY']
        @base_url = params[:use_ssl] ? 'https://prod.api.pvp.net/' : 'http://prod.api.pvp.net/'
        @region = params[:region] || 'na'
        @adapter = params[:adapter] || Faraday.default_adapter
        @logger = params[:debug] ? :logger : :raise_error
        @locale = params[:locale] || 'en_US'

        fail ArgumentError, 'You should need "Riot Games API Key" at leaet.' unless @api_key
      end

      def connection
        Faraday.new(url: @base_url) do |faraday|
          faraday.request :url_encoded
          faraday.response :rashify
          faraday.response :json
          faraday.response @logger
          faraday.adapter @adapter
          faraday.params[:api_key] = @api_key
          faraday.params[:locale] = @locale
          faraday.headers['User-Agent'] = "RiotGamesApi gem v#{RiotGamesApi::VERSION}"<commit_msg>fix end point url for riot change spec<commit_after>module RiotGamesApi
  module LOL
    class Client
      def initialize(params = {})
        @api_key = params[:api_key] || ENV['RIOT_GAMES_API_KEY']
        @region = params[:region] || 'na'
        @base_url = params[:use_ssl] ? "https://na.api.pvp.net/" : "http://na.api.pvp.net/"
        @adapter = params[:adapter] || Faraday.default_adapter
        @logger = params[:debug] ? :logger : :raise_error
        @locale = params[:locale] || 'en_US'

        fail ArgumentError, 'You should need "Riot Games API Key" at leaet.' unless @api_key
      end

      def connection
        Faraday.new(url: @base_url) do |faraday|
          faraday.request :url_encoded
          faraday.response :rashify
          faraday.response :json
          faraday.response @logger
          faraday.adapter @adapter
          faraday.params[:api_key] = @api_key
          faraday.params[:locale] = @locale
          faraday.headers['User-Agent'] = "RiotGamesApi gem v#{RiotGamesApi::VERSION}"
{'fraction_non_alphanumeric': 0.12653261402648358, 'fraction_numerical': 0.0, 'mean_word_length': 2.617021276595745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5194631', 'n_tokens_mistral': 661, 'n_tokens_neox': 633, 'n_words': 138}