<commit_before>// es6 application code

import Human from './human.js'
import Github from './../client/github/github-client.js'
import lively4 from './../src/lively4-client.js'
import messaging from './../src/client/messaging.js'

let foo = new Human("Foo", "Bar");

messaging.postMessage({
    meta: {
        type: 'foo'
    },
    message: 'HELLOOO?'
}).then(e => {
    "use strict";

    console.log('+ + + ++  ++ + + + + + + + + + + + +');
    console.log(e.data);
});

Github.getRepo((result) => {
    "use strict";
    console.log('# # # # # # # # # # # # # # # # # # # # # ');
    console.log(result);
    console.log(Github);
});

document.querySelector("h1").innerHTML = `Hello ${foo.toString()}`;<commit_msg>use messaging api to access github in the sample application<commit_after>// es6 application code

import Human from './human.js'
import Github from './../client/github/github-client.js'
import lively4 from './../src/lively4-client.js'
import messaging from './../src/client/messaging.js'

let foo = new Human("Foo", "Bar");

messaging.postMessage({
    meta: {
        type: 'foo'
    },
    message: 'HELLOOO?'
}).then(e => {
    "use strict";

    console.log('+ + + ++  ++ + + + + + + + + + + + +');
    console.log(e.data);
});

messaging.postMessage({
    meta: {
        type: 'github api'
    },
    message: {
        // TODO: use .config file for such parametrization
        credentials: {
            token: 'f468386a26986cbe44a80584fd478da86be3d546',
            auth: 'oauth'
        },
        topLevelAPI: 'getRepo',
        topLevelArguments: ['Lively4', 'manuallycreated'],
        method: 'read',
        args: ['master', 'README.md']
    }
}).then(e => {
    "use strict";

    console.log('+ + + ++  ++ + + + + + + + + + + + +');
    console.log(e.data.message);
});


document.querySelector("h1").innerHTML = `Hello ${foo.toString()}`;
{'fraction_non_alphanumeric': 0.208955223880597, 'fraction_numerical': 0.019189765458422176, 'mean_word_length': 2.58206106870229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5168100', 'n_tokens_mistral': 671, 'n_tokens_neox': 641, 'n_words': 125}