<commit_before>module.exports = wpQuery;

function wpQuery( options ) {
	this._options = options || {};
	this._filters = {};
	this._supportedMethods = [ 'head', 'get', 'put', 'post', 'patch', 'delete' ];
}

wpQuery.prototype.filter = function( obj ) {
	this._filters = obj;
	return this;
};

wpQuery.prototype._isSupportedMethod = function( method ) {
	if( this._supportedMethods.indexOf( method ) === -1 ) {
		throw new Error( 'Unsupported method; supported methods are: ' + this._supportedMethods.join( ', ' ) );
	}

	return true;
}

wpQuery.prototype.generateRequestUri = function () {
 	return '';
};

wpQuery.prototype.get = function( callback ) {
	this._isSupportedMethod( 'get' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.post = function( data, callback ) {
	this._isSupportedMethod( 'post' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.put = function( callback ) {
	this._isSupportedMethod( 'put' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.patch = function( callback ) {
	this._isSupportedMethod( 'patch' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.delete = function( callback ) {
	this._isSupportedMethod( 'delete' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.head = function( callback ) {
	this._isSupportedMethod( 'head' );
	var path = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};<commit_msg>the `get` request now works!<commit_after>var request = require( 'superagent' );
module.exports = wpQuery;

function wpQuery( options ) {
	this._options = options || {};
	this._filters = {};
	this._supportedMethods = [ 'head', 'get', 'put', 'post', 'patch', 'delete' ];
}

wpQuery.prototype.filter = function( obj ) {
	this._filters = obj;
	return this;
};

wpQuery.prototype._isSupportedMethod = function( method ) {
	if( this._supportedMethods.indexOf( method ) === -1 ) {
		throw new Error( 'Unsupported method; supported methods are: ' + this._supportedMethods.join( ', ' ) );
	}

	return true;
}

wpQuery.prototype.generateRequestUri = function () {
 	return '';
};

wpQuery.prototype.get = function( callback ) {
	this._isSupportedMethod( 'get' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );

	request.get( url ).end( function( result ) {
		callback( result.body );
	} );
};

wpQuery.prototype.post = function( data, callback ) {
	this._isSupportedMethod( 'post' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.put = function( callback ) {
	this._isSupportedMethod( 'put' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.patch = function( callback ) {
	this._isSupportedMethod( 'patch' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.delete = function( callback ) {
	this._isSupportedMethod( 'delete' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};

wpQuery.prototype.head = function( callback ) {
	this._isSupportedMethod( 'head' );
	var url = this.generateRequestUri();
	callback = ( typeof callback === 'function' ) ? callback : ( function() {} );
};
{'fraction_non_alphanumeric': 0.17203742203742203, 'fraction_numerical': 0.0005197505197505198, 'mean_word_length': 4.490727532097004, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6765218', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1139, 'n_words': 271}