<commit_before>require "net/http"

module Every8d
  class Client
    attr_accessor :account, :password

    def initialize(options = {})
      @account = options.fetch(:account) { ENV.fetch('EVERY8d_ACCOUNT') }

      @password = options.fetch(:password) { ENV.fetch('<PASSWORD>_PASSWORD') }

      @host = options.fetch(:host) { 'http://api.every8d.com/API21/HTTP' }
    end

    def get_message(options = {})
      http_post('getDeliveryStatus.ashx', options)
    end

    def get_balance
      http_post('getCredit.ashx')
    end

    def send_sms(options = {})
      http_post('sendSMS.ashx', options)
    end

    def http_post(url, data = {})
      Net::HTTP.post_form(URI.parse("#{@host}/#{url}"), data.merge(UID: @account, PWD: @password)).body
    end
  end
end<commit_msg>rename account & password to correct name<commit_after>require "net/http"

module Every8d
  class Client
    attr_accessor :account, :password

    def initialize(options = {})
      @uid = options.fetch(:UID) { ENV.fetch('EVERY8d_ACCOUNT') }

      @pwd = options.fetch(:PWD) { ENV.fetch('<PASSWORD>') }

      @host = options.fetch(:host) { 'http://api.every8d.com/API21/HTTP' }
    end

    def get_message(options = {})
      http_post('getDeliveryStatus.ashx', options)
    end

    def get_balance
      http_post('getCredit.ashx')
    end

    def send_sms(options = {})
      http_post('sendSMS.ashx', options)
    end

    def http_post(url, data = {})
      Net::HTTP.post_form(URI.parse("#{@host}/#{url}"), data.merge(UID: @uid, PWD: @pwd)).body
    end
  end
end
{'fraction_non_alphanumeric': 0.15488431876606684, 'fraction_numerical': 0.006426735218508998, 'mean_word_length': 3.242506811989101, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '76245', 'n_tokens_mistral': 549, 'n_tokens_neox': 543, 'n_words': 96}