{"size": 1081, "ext": "js", "max_stars_repo_path": "rest-ticker.js", "max_stars_repo_name": "stevek-pro/bitfinex-qa", "max_stars_repo_stars_event_min_datetime": "2019-08-21T15:24:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-21T15:24:57.000Z", "max_issues_repo_path": "rest-ticker.js", "max_issues_repo_name": "meshfields/bitfinex-qa", "max_issues_repo_issues_event_min_datetime": "2019-08-09T02:03:55.000Z", "max_issues_repo_issues_event_max_datetime": "2020-03-18T10:15:24.000Z", "max_forks_repo_path": "rest-ticker.js", "max_forks_repo_name": "meshfields/bitfinex-qa", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 38.6071428571, "max_line_length": 85, "alphanum_fraction": 0.6003700278}
const config = require('./config');
const request = require('request');
const url = config.apiRestPub;
const chai = require('chai');
const assert = chai.assert;

request.get(url + "ticker/tBTCUSD",
    (error, response, body) => {

        body = JSON.parse(body);
        console.log(body);

        assert.equal(body.length, 10, 'Must be an Array of Length 10');
        assert.typeOf(body[0], 'Number', 'Must be a Number');
        assert.typeOf(body[1], 'Number', 'Must be a Number');
        assert.typeOf(body[2], 'Number', 'Must be a Number');
        assert.typeOf(body[3], 'Number', 'Must be a Number');
        assert.typeOf(body[4], 'Number', 'Must be a Number');
        assert.typeOf(body[5], 'Number', 'Must be a Number');
        assert.typeOf(body[6], 'Number', 'Must be a Number');
        assert.typeOf(body[7], 'Number', 'Must be a Number');
        assert.typeOf(body[8], 'Number', 'Must be a Number');
        assert.typeOf(body[9], 'Number', 'Must be a Number');

        console.log('\x1b[42m%s\x1b[0m', 'OK. Ticker Array Length and Types valid.');
    });

