<commit_before>(function() {
  var Q = require('q');

  // Sickbeard shows class
  var SickbeardHistory = function(delegate) {
    this.delegate = delegate;
  };

  module.exports = SickbeardHistory;

})();<commit_msg>Added history methods.<commit_after>(function() {
  var Q = require('q');

  // Sickbeard shows class
  var SickbeardHistory = function(delegate) {
    this.delegate = delegate;
  };

  /**
   * Call the 'history' method of the API, and return the data
   * from the call.
   * 
   * @param object args
   *   Optional arguments to be passed with the call.
   *   
   * @return array
   *
   * @see http://sickbeard.com/api/#history
   */
  SickbeardHistory.prototype.self = function(args) {
    var delegate  = this.delegate;

    return delegate.cmd('history', args).then(function(response){
      return response.data;
    });
  };

  /**
   * Call the 'history.trim' method of the API, and return the data
   * from the call.
   * 
   * @return object
   *
   * @see http://sickbeard.com/api/#history.trim
   */
  SickbeardHistory.prototype.trim = function() {
    var delegate  = this.delegate;

    return delegate.cmd('history.trim').then(function(response){
      return response;
    });
  };

  /**
   * Call the 'history.clear' method of the API, and return the data
   * from the call.
   * 
   * @return object
   *
   * @see http://sickbeard.com/api/#history.clear
   */
  SickbeardHistory.prototype.clear = function() {
    var delegate  = this.delegate;

    return delegate.cmd('history.clear').then(function(response){
      return response;
    });
  };

  module.exports = SickbeardHistory;

})();
{'fraction_non_alphanumeric': 0.13761467889908258, 'fraction_numerical': 0.0, 'mean_word_length': 2.7782909930715936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6233590', 'n_tokens_mistral': 528, 'n_tokens_neox': 514, 'n_words': 123}