<commit_before>'use strict';

var servicesModule = require('./_index.js');

/**
 * @ngInject
 */
function NkdsuService($q, $http) {

  var service = {};

  service.get = function(username) {
    var deferred = $q.defer();

    $http
      .get('https://nkd.su/api/search/?q=' + username)
      .success(function(data) {
        var output = data.filter(function(x){
          // return x.status === 'on-hold';
          // return x.status !== 'plan-to-watch';
        });
        deferred.resolve(data);
      })
      .error(function(err, status) {
          deferred.reject(err, status);
      });

    return deferred.promise;
  };

  return service;

}

servicesModule.service('NkdsuService', NkdsuService);<commit_msg>Only show eligible tracks, #2<commit_after>'use strict';

var servicesModule = require('./_index.js');

/**
 * @ngInject
 */
function NkdsuService($q, $http) {

  var service = {};

  service.get = function(username) {
    var deferred = $q.defer();

    $http
      .get('https://nkd.su/api/search/?q=' + username)
      .success(function(data) {
        var output = data.filter(function(x){
          return x.eligible === true;
        });
        deferred.resolve(output);
      })
      .error(function(err, status) {
          deferred.reject(err, status);
      });

    return deferred.promise;
  };

  return service;

}

servicesModule.service('NkdsuService', NkdsuService);
{'fraction_non_alphanumeric': 0.17045454545454544, 'fraction_numerical': 0.0007102272727272727, 'mean_word_length': 2.5670886075949366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2065060', 'n_tokens_mistral': 467, 'n_tokens_neox': 449, 'n_words': 80}