<commit_before>"use strict";

var sendReq = require('../tools/sendReq.js');

module.exports = {

    createSensor: function(data){
        return sendReq('POST', '/sensor/create', data);
    },
    updateSensor: function(data){
        return sendReq('POST', '/sensor/update', data);
    },
    deleteSensor: function(id){
        return sendReq('POST', '/sensor/delete' + id);
    },
    deleteAllSensors: function(){
        return sendReq('POST', '/sensor/deleteAll');
    },
    getSensor: function(id){
        return sendReq('POST', '/sensor/get' + id);
    },
    getAllSensors: function(){
        return sendReq('POST', '/sensor/getAll');
    }


    createPlace: function(data){
        return sendReq('POST', '/place/create', data);
    },
    updatePlace: function(data){
        return sendReq('POST', '/place/update', data);
    },
    deletePlace: function(id){
        return sendReq('POST', '/place/delete' + id);
    },
    deleteAllPlaces: function(){
        return sendReq('POST', '/place/deleteAll');
    },
    getPlace: function(id){
        return sendReq('POST', '/place/get' + id);
    },
    getAllPlaces: function(){
        return sendReq('POST', '/place/getAll');
    }

/*
    getLiveAffluence: function(){
        return sendReq('GET', '/live-affluence');
    },
    getPlaceMeasurements: function(id){
        return sendReq('GET', '/place/' + id);
    },
    getAllPlacesInfos: function(){
        return sendReq('GET', '/allPlacesInfos');
    },
    getAllSensors: function(){
        return sendReq('GET', '/allSensors');<commit_msg>DELETE requests in internal API<commit_after>"use strict";

var sendReq = require('../tools/sendReq.js');

module.exports = {

    createSensor: function(data){
        return sendReq('POST', '/sensor/create', data);
    },
    updateSensor: function(data){
        return sendReq('POST', '/sensor/update', data);
    },
    deleteSensor: function(id){
        return sendReq('DELETE', '/sensor/delete/' + id);
    },
    deleteAllSensors: function(){
        return sendReq('DELETE', '/sensor/deleteAll');
    },
    getSensor: function(id){
        return sendReq('POST', '/sensor/get/' + id);
    },
    getAllSensors: function(){
        return sendReq('POST', '/sensor/getAll');
    }


    createPlace: function(data){
        return sendReq('POST', '/place/create', data);
    },
    updatePlace: function(data){
        return sendReq('POST', '/place/update', data);
    },
    deletePlace: function(id){
        return sendReq('DELETE', '/place/delete/' + id);
    },
    deleteAllPlaces: function(){
        return sendReq('DELETE', '/place/deleteAll');
    },
    getPlace: function(id){
        return sendReq('POST', '/place/get/' + id);
    },
    getAllPlaces: function(){
        return sendReq('POST', '/place/getAll');
    }

/*
    getLiveAffluence: function(){
        return sendReq('GET', '/live-affluence');
    },
    getPlaceMeasurements: function(id){
        return sendReq('GET', '/place/' + id);
    },
    getAllPlacesInfos: function(){
        return sendReq('GET', '/allPlacesInfos');
    },
    getAllSensors: function(){
        return sendReq('GET', '/allSensors');
{'fraction_non_alphanumeric': 0.17854889589905362, 'fraction_numerical': 0.0, 'mean_word_length': 2.797604790419162, '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': '613293', 'n_tokens_mistral': 947, 'n_tokens_neox': 948, 'n_words': 193}