<commit_before>'use strict';
const co = require('co');
const http = require('./utilities/http');
const variables = require('./variables');
const httpSettings = http.SETTINGS;

function profile(user_id, token, content, skip) {
	if(content == undefined) {content="all"}
	if(skip == undefined) {skip=0}
	
	const url = `${variables['API']}/users/${user_id}`;
	let parameters = { app: 3, plat: 2, };
	if (token != null && token != undefined) {
		const token_id = token["id"];
		const token_key = token["key"];
		const user_id = token["user_id"];
		parameters = {
			app: 3,
			plat: 2,
			content,
			skip,
			token_id, token_key, user_id
		};
	}

	return http
		.GET(url, parameters)
		.then(data => data.profile);
}

function rant(rant_id, token) {
	return co(function *getrant() {
		const url = `${variables['API']}/devrant/rants/${rant_id}`;
		let parameters = { app: 3	};
		console.log(token)
		if (token != null && token != undefined) {
			const token_id = token["id"];
			const token_key = token["key"];
			const user_id = token["user_id"];
			parameters = {
				app: 3,<commit_msg>Fixed bug from my inability to write working code.<commit_after>'use strict';
const co = require('co');
const http = require('./utilities/http');
const variables = require('./variables');
const httpSettings = http.SETTINGS;

function profile(user_id, token, content, skip) {
	if(content == undefined) {content="all"}
	if(skip == undefined) {skip=0}
	
	const url = `${variables['API']}/users/${user_id}`;
	let parameters = { app: 3, plat: 2 };
	if (content != null && content != undefined) {
		parameters = { app: 3, plat: 2, content };
	}
	if (skip != null && skip != undefined) {
		parameters = { app: 3, plat: 2, skip };
	}
	if (content != null && content!= undefined && skip != null && skip != undefined) {
		parameters = { app: 3, plat: 2, content, skip };
	}
	if (token != null && token != undefined) {
		const token_id = token["id"];
		const token_key = token["key"];
		const user_id = token["user_id"];
		parameters = {
			app: 3,
			plat: 2,
			content,
			skip,
			token_id, token_key, user_id
		};
	}

	return http
		.GET(url, parameters)
		.then(data => data.profile);
}

function rant(rant_id, token) {
	return co(function *getrant() {
		const url = `${variables['API']}/devrant/rants/${rant_id}`;
		let parameters = { app: 3	};
		console.log(token)
		if (token != null && token != undefined) {
			const token_id = token["id"];
			const token_key = token["key"];
			const user_id = token["user_id"];
			parameters = {
				app: 3,
{'fraction_non_alphanumeric': 0.1794059405940594, 'fraction_numerical': 0.007920792079207921, 'mean_word_length': 3.904854368932039, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2072586', 'n_tokens_mistral': 935, 'n_tokens_neox': 854, 'n_words': 235}