<commit_before>/**
 * Created by Johannes on 02.12.2014.
 */


var client = new Dropbox.Client({ key: "<KEY>" });

function authenticate(){
    client.authenticate(function(error, client) {
        if (error) {
            // Replace with a call to your own error-handling code.
            //
            // Don't forget to return from the callback, so you don't execute the code
            // that assumes everything went well.
            return showError(error);
        }

        // Replace with a call to your own application code.
        //
        // The user authorized your app, and everything went well.
        // client is a Dropbox.Client instance that you can use to make API calls.
        doSomethingCool(client);
    });
}<commit_msg>First version to get folders and files of dropbox<commit_after>/**
 * Created by Johannes on 02.12.2014.
 */


var client = new Dropbox.Client({ key: "<KEY>" });

function authenticate(){
    client.authenticate(function(error, client) {
        if (error) {
            // Replace with a call to your own error-handling code.
            //
            // Don't forget to return from the callback, so you don't execute the code
            // that assumes everything went well.
            return showError(error);
        }

        // Replace with a call to your own application code.
        //
        // The user authorized your app, and everything went well.
        // client is a Dropbox.Client instance that you can use to make API calls.
        addFolderToTree(client, tree, "");
    });
}

var addFolderToTree = function (client, tree, folder) {
    // TODO add folder to tree

    client.readdir(folder, undefined, function (apierror, names, folder, entries) {
        entries.forEach(function () {
            if(this.isFile){
                // TODO add file to tree
            }else{
                readFolder(client, tree, this);
            }
        })
    });
}
{'fraction_non_alphanumeric': 0.10056730273336771, 'fraction_numerical': 0.008251676121712223, 'mean_word_length': 1.912912912912913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6216587', 'n_tokens_mistral': 524, 'n_tokens_neox': 488, 'n_words': 196}