<commit_before># CHECKROOM CORE JS

A JavaScript wrapper around the CHEQROOM REST API

## Repo

https://github.com/CHECKROOM/checkroom_core_js

## Installation

Install `sudo npm install` required npm packages

## Build instructions

Call `grunt` to build and run the tests

Call `grunt docs` to rebuild the documentation

## Sample code

```javascript

//
// Authenticating via username and password
//
var baseUrl = 'https://app.cheqroom.com/api/v2_0';
var userName = "";
var password = "";

var ajax = new cr.api.ApiAjax({useJsonp: true});
var auth = new cr.api.ApiAuthV2({ajax: ajax, urlAuth: baseUrl + '/authenticate'});
var authUser = null;

auth.authenticate(userName, password)
    .done(function(data) {
        authUser = new cr.api.ApiUser({userId: data.userId, userToken: data.token});
    });

...

//
// Using datasources<commit_msg>Added docs url<commit_after># CHECKROOM CORE JS

A JavaScript wrapper around the CHEQROOM REST API

## Repo

https://github.com/CHECKROOM/checkroom_core_js

## Docs
http://checkroom.github.io/checkroom_core_js/

## Installation

Install `sudo npm install` required npm packages

## Build instructions

Call `grunt` to build and run the tests

Call `grunt docs` to rebuild the documentation

Call 'grunt gh-pages' to publish the documentation

## Sample code

```javascript

//
// Authenticating via username and password
//
var baseUrl = 'https://app.cheqroom.com/api/v2_0';
var userName = "";
var password = "";

var ajax = new cr.api.ApiAjax({useJsonp: true});
var auth = new cr.api.ApiAuthV2({ajax: ajax, urlAuth: baseUrl + '/authenticate'});
var authUser = null;

auth.authenticate(userName, password)
    .done(function(data) {
        authUser = new cr.api.ApiUser({userId: data.userId, userToken: data.token});
    });

...

//
// Using datasources
{'fraction_non_alphanumeric': 0.12874583795782463, 'fraction_numerical': 0.003329633740288568, 'mean_word_length': 4.0363128491620115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1905151', 'n_tokens_mistral': 611, 'n_tokens_neox': 586, 'n_words': 172}