<commit_before><?php
	/**
	 * Include the AhrefsAPI class 
	 */
	include('lib/AhrefsAPI.php');

	/**
	 * Create an AhrefsAPI class instance
	 * @param String APItoken from https://ahrefs.com/api/
	 * @param Boolean $debug Debug message
	 */
	$Ahrefs = new AhrefsAPI('[YOURTOKEN]', $debug = true);
	
	/**
	 * Specify the aim of the request. The mode defines how the target will be interpreted. Example:
	 * set_target('ahrefs.com/api/')
	 * mode_exact()		 ->  ahrefs.com/api/	
	 * mode_domain() 	 ->  ahrefs.com/*	
	 * mode_subdomain()  ->  *ahrefs.com/*	
	 * mode_prefix()	 ->  ahrefs.com/api/*	
	 * for more details, visit https://ahrefs.com/api/documentation.php
	 */
	$Ahrefs->set_target('ahrefs.com')->mode_domain();
	
	/**
	 * Query the results.
	 * select('column_a','column_b','column_c')    							 //specify a comma-separated list of columns for the service to return. If the parameter is not set or is equal to *, all columns of the table are returned. 
	 																		 //Only the columns that can appear in the having filter will be returned. 
	 																		 
	 * where_[eq|ne|gt|lt|gte|lte|substring|word]('column_a', 'value_a')   	 //eq (equal '='), ne(not equal '<>'), gt(greater than '>='), lt(less than '<='), gte(greater than or equal '>='), lte(less than or equal '<=').
	   Sample usage :
	   $Ahrefs->where_eq('url', 'ahrefs.com') 								 //returning rows with url="ahrefs.com".
	   $Ahrefs->where_eq('url', 'ahrefs.com')->where_gt('ahrefs_rank', 3)    //returning rows with url="ahrefs.com" AND ahrefs_rank>3.
	 
	 * having_[eq|ne|gt|lt|gte|lte|substring|word]('column_a', 'value_a')    //similar to where, the difference is for some tables, the returned data is implicitly grouped before being returned. 
	 																		 //The where filter applies to the data before grouping, and the having filter applies to the grouped data. 
	 																		 //See column descriptions under documentations for the particular table to decide whether to use where or having for filtering. 
	 																		 
	 * order_by('column_a:desc','column_b','column_c:desc')					 //sorting the result based on the columns, ascending by default. For descending usage, add :desc after the column name.
	 * set_limit() 															 //limit the amount of retrieved data, the default is 1000.
	 * set_offset()															 //number of row the data start to be retrieved, default is 0 (first data).
	 * to_xml()																 //format the returned data in XML<commit_msg>Closes #1; Typo in index.php documentation mode_subdomain -> mode_subdomains<commit_after><?php
	/**
	 * Include the AhrefsAPI class 
	 */
	include('lib/AhrefsAPI.php');

	/**
	 * Create an AhrefsAPI class instance
	 * @param String APItoken from https://ahrefs.com/api/
	 * @param Boolean $debug Debug message
	 */
	$Ahrefs = new AhrefsAPI('[YOURTOKEN]', $debug = true);
	
	/**
	 * Specify the aim of the request. The mode defines how the target will be interpreted. Example:
	 * set_target('ahrefs.com/api/')
	 * mode_exact()		 ->  ahrefs.com/api/	
	 * mode_domain() 	 ->  ahrefs.com/*	
	 * mode_subdomains()  ->  *ahrefs.com/*
	 * mode_prefix()	 ->  ahrefs.com/api/*	
	 * for more details, visit https://ahrefs.com/api/documentation.php
	 */
	$Ahrefs->set_target('ahrefs.com')->mode_domain();
	
	/**
	 * Query the results.
	 * select('column_a','column_b','column_c')    							 //specify a comma-separated list of columns for the service to return. If the parameter is not set or is equal to �*�, all columns of the table are returned. 
	 																		 //Only the columns that can appear in the �having� filter will be returned. 
	 																		 
	 * where_[eq|ne|gt|lt|gte|lte|substring|word]('column_a', 'value_a')   	 //eq (equal '='), ne(not equal '<>'), gt(greater than '>='), lt(less than '<='), gte(greater than or equal '>='), lte(less than or equal '<=').
	   Sample usage :
	   $Ahrefs->where_eq('url', 'ahrefs.com') 								 //returning rows with url="ahrefs.com".
	   $Ahrefs->where_eq('url', 'ahrefs.com')->where_gt('ahrefs_rank', 3)    //returning rows with url="ahrefs.com" AND ahrefs_rank>3.
	 
	 * having_[eq|ne|gt|lt|gte|lte|substring|word]('column_a', 'value_a')    //similar to where, the difference is for some tables, the returned data is implicitly grouped before being returned. 
	 																		 //The �where� filter applies to the data before grouping, and the �having� filter applies to the grouped data. 
	 																		 //See column descriptions under documentations for the particular table to decide whether to use �where� or �having� for filtering. 
	 																		 
	 * order_by('column_a:desc','column_b','column_c:desc')					 //sorting the result based on the columns, ascending by default. For descending usage, add :desc after the column name.
	 * set_limit() 															 //limit the amount of retrieved data, the default is 1000.
	 * set_offset()															 //number of row the data start to be retrieved, default is 0 (first data).
	 * to_xml()																 //format the returned data in XML
{'fraction_non_alphanumeric': 0.13015998419909144, 'fraction_numerical': 0.002962670353545329, 'mean_word_length': 2.842185128983308, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 30, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6973273', 'n_tokens_mistral': 1946, 'n_tokens_neox': 1502, 'n_words': 501}