<commit_before># encoding: utf-8

#
# WARNING: Do not edit by hand, this file was generated by Heroics:
#
#   https://github.com/heroku/heroics
#

require 'uri'

module <%= @module_name %>
  # Get a Client configured to use HTTP Basic authentication.
  #
  # @param username [String] The username to use with the API.
  # @param password [String] The password to use with the API.
  # @param headers [Hash<String,String>] Optionally, custom to headers to
  #   include with every response.
  # @return [Client] A client configured to use the API with HTTP Basic
  #   authentication.
  def self.connect(username, password, headers=nil)
    url = URI.parse("<%= @url %>")
    url.user = username
    url.password = password
    default_headers = <%= @default_headers %>
    unless headers.nil?
      default_headers.merge!(headers)
    end
    cache = <%= @cache %>
    options = {
      options: {default_headers: default_headers,
                cache: cache}
    }
    client = Heroics.client_from_schema(SCHEMA, url.to_s, options)
    Client.new(client)
  end

  # Get a Client configured to use OAuth authentication.
  #
  # @param oauth_token [String] The OAuth token to use with the API.
  # @param headers [Hash<String,String>] Optionally, custom to headers to
  #   include with every response.
  # @return [Client] A client configured to use the API with OAuth
  #   authentication.
  def self.connect_oauth(oauth_token, headers=nil)
    url = "<%= @url %>"
    default_headers = <%= @default_headers %>
    unless headers.nil?
      default_headers.merge!(headers)
    end
    cache = <%= @cache %>
    options = {
      options: {default_headers: default_headers,
                cache: cache}
    }
    client = Heroics.client_from_schema(oauth_token, SCHEMA, url, options)
    Client.new(client)
  end<commit_msg>Don't double nest options in options<commit_after># encoding: utf-8

#
# WARNING: Do not edit by hand, this file was generated by Heroics:
#
#   https://github.com/heroku/heroics
#

require 'uri'

module <%= @module_name %>
  # Get a Client configured to use HTTP Basic authentication.
  #
  # @param username [String] The username to use with the API.
  # @param password [String] The password to use with the API.
  # @param headers [Hash<String,String>] Optionally, custom to headers to
  #   include with every response.
  # @return [Client] A client configured to use the API with HTTP Basic
  #   authentication.
  def self.connect(username, password, headers=nil)
    url = URI.parse("<%= @url %>")
    url.user = username
    url.password = password
    default_headers = <%= @default_headers %>
    unless headers.nil?
      default_headers.merge!(headers)
    end
    cache = <%= @cache %>
    options = {
      default_headers: default_headers,
                cache: cache
    }
    client = Heroics.client_from_schema(SCHEMA, url.to_s, options)
    Client.new(client)
  end

  # Get a Client configured to use OAuth authentication.
  #
  # @param oauth_token [String] The OAuth token to use with the API.
  # @param headers [Hash<String,String>] Optionally, custom to headers to
  #   include with every response.
  # @return [Client] A client configured to use the API with OAuth
  #   authentication.
  def self.connect_oauth(oauth_token, headers=nil)
    url = "<%= @url %>"
    default_headers = <%= @default_headers %>
    unless headers.nil?
      default_headers.merge!(headers)
    end
    cache = <%= @cache %>
    options = {
      default_headers: default_headers,
                cache: cache
    }
    client = Heroics.client_from_schema(oauth_token, SCHEMA, url, options)
    Client.new(client)
  end
{'fraction_non_alphanumeric': 0.10539282781275663, 'fraction_numerical': 0.0005474952094169176, 'mean_word_length': 3.142857142857143, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '7433202', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1084, 'n_words': 350}