<commit_before>module Sermonaudio
	class Finder

    @@client ||= Sermonaudio::Sermon.new.savon

    def self.request(request_name, opts = {})
      request = @@client.request :ser, request_name, body: opts
    end

    def self.newest(opts = {})
      raise MissingOption, "Please provide valid parameters when retrieving newest entries" if opts.empty?
      call = :newest_sermons_by_speaker if opts.has_key? "SpeakerName"
      call = :newest_sermons_by_member_id if opts.has_key? "MemberID"
      if opts.has_key?(:what) && opts[:what] == "series"
        raise MissingOption, "Please provid a member id when searching for a series" unless opts.has_key? "MemberID"
        call = :get_newest_series_by_member_id 
      end
      response = self.request(call, opts)
      # puts response.inspect
    end

    def self.sermons(opts = {})
      # response = request(call, opts)
      # puts response.inspect
    end

    def self.series(opts = {})
      # response = request(call, opts)<commit_msg>Fixed syntax error in Ruby 1.8.7<commit_after>module Sermonaudio
	class Finder

    @@client ||= Sermonaudio::Sermon.new.savon

    def self.request(request_name, opts = {})
      request = @@client.request :ser, request_name, :body => opts
    end

    def self.newest(opts = {})
      raise MissingOption, "Please provide valid parameters when retrieving newest entries" if opts.empty?
      call = :newest_sermons_by_speaker if opts.has_key? "SpeakerName"
      call = :newest_sermons_by_member_id if opts.has_key? "MemberID"
      if opts.has_key?(:what) && opts[:what] == "series"
        raise MissingOption, "Please provid a member id when searching for a series" unless opts.has_key? "MemberID"
        call = :get_newest_series_by_member_id 
      end
      response = self.request(call, opts)
      # puts response.inspect
    end

    def self.sermons(opts = {})
      # response = request(call, opts)
      # puts response.inspect
    end

    def self.series(opts = {})
      # response = request(call, opts)
{'fraction_non_alphanumeric': 0.10495049504950495, 'fraction_numerical': 0.0014851485148514852, 'mean_word_length': 3.1670103092783504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1846879', 'n_tokens_mistral': 648, 'n_tokens_neox': 635, 'n_words': 166}