<commit_before>import angular from 'angular';

export default class ClashbotService {

    constructor($http, FacebookService) {
        this.$http = $http;
        this.FacebookService = FacebookService;
    }
    
    
    start() {
        return this._api('start');
    }
    
    
    stop() {
        return this._api('stop');
    }
    
    
    close() {
        return this._api('close');
    }
    
    
    is_started() {
        return this._api('is_started');
    }
    
    
    is_running() {
        return this._api('is_running');
    }
    
    
    _api(method) {
        console.log(['sending', method]);
        
        return this.$http({
            method: 'GET',
            url: '/proxy/' + method,
            data: {
                id: this.FacebookService.getFBUserID()
            }
        });
    }
}

ClashbotService.$inject = ['$http', 'FacebookService'];<commit_msg>path for /proxy set to go via API<commit_after>import angular from 'angular';

export default class ClashbotService {

    constructor($http, FacebookService) {
        this.$http = $http;
        this.FacebookService = FacebookService;
    }
    
    
    start() {
        return this._api('start');
    }
    
    
    stop() {
        return this._api('stop');
    }
    
    
    close() {
        return this._api('close');
    }
    
    
    is_started() {
        return this._api('is_started');
    }
    
    
    is_running() {
        return this._api('is_running');
    }
    
    
    _api(method) {
        console.log(['sending', method]);
        
        return this.$http({
            method: 'GET',
            url: '/api/proxy/' + method,
            data: {
                id: this.FacebookService.getFBUserID()
            }
        });
    }
}

ClashbotService.$inject = ['$http', 'FacebookService'];
{'fraction_non_alphanumeric': 0.1355191256830601, 'fraction_numerical': 0.0, 'mean_word_length': 1.5572625698324023, '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': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6705211', 'n_tokens_mistral': 555, 'n_tokens_neox': 540, 'n_words': 96}