<commit_before>module SermonAudio
  # Operations that the SermonAudio module can call to
  # retrieve data from sermonaudio.com
  module Operations
    def get_sermon_info(sermon_id)
      execute_call(__callee__, {
        'MemberID' => ENV['SERMONAUDIO_MEMBER_ID'],
        'Password' => ENV['<PASSWORD>'],
        'SermonID' => sermon_id
      })
    end

    def get_speakers_by_member_id(member_id)
      response = execute_call(__callee__, { "MemberID" => member_id })
      response[:string] || []
    end

    private

      def execute_call(operation, opts = {})
        response = SermonAudio.client.call(operation, message: opts)
        response.body["#{operation}_response".to_sym]["#{operation}_result".to_sym]
      end

  end
end<commit_msg>rubocop :smile:<commit_after>module SermonAudio
  # Operations that the SermonAudio module can call to
  # retrieve data from sermonaudio.com
  module Operations
    def get_sermon_info(sermon_id)
      execute_call(__callee__,
                   'MemberID' => ENV['SERMONAUDIO_MEMBER_ID'],
                   'Password' => ENV['<PASSWORD>'],
                   'SermonID' => sermon_id
      )
    end

    def get_speakers_by_member_id(member_id)
      response = execute_call(__callee__,  'MemberID' => member_id)
      response[:string] || []
    end

    private

    def execute_call(name, opts = {})
      response = SermonAudio.client.call(name, message: opts)
      response.body[:"#{name}_response"][:"#{name}_result"]
    end
  end
end
{'fraction_non_alphanumeric': 0.11318242343541944, 'fraction_numerical': 0.0, 'mean_word_length': 3.0403225806451615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '790932', 'n_tokens_mistral': 488, 'n_tokens_neox': 481, 'n_words': 92}