HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //home/httpd/mech_ftp/baretube.com/api/api.documentation.php
<?
$headertitle = "Public API Documentation v1.0"; 
$title = "Public API Documentation v1.0"; 
getTemplate('template.overall_header.php');
?>
<p>This website features a public JSON-Based API which allow you to interface with it. Below are the methods and sample outputs.<p>

<h3>&raquo; media.newest</h3>
<p>This endpoint allows you to request the newest media from the website.<br />
Sample Request: <? echo $basehttp; ?>/api/?output=json&command=media.newest&type=videos&amp;offset=0&amp;amount=10<br><br>
The endpoint accepts the following parameters:</p>

<table width="500" border="1" cellspacing="0" cellpadding="5">
	<tr>
		<td valign="top">output</td>
		<td valign="top">Must be set to &quot;json&quot;. Currently, this is the only available output format.</td>
	</tr>
	<tr>
		<td width="104" valign="top">command</td>
		<td width="396" valign="top">Must be set to &quot;media.newest&quot;</td>
	</tr>
	<tr>
		<td valign="top">type</td>
		<td valign="top">The type of media to display. Must be &quot;videos&quot; or &quot;galleries&quot;.</td>
	</tr>
	<tr>
		<td valign="top">offset</td>
		<td valign="top">Number of media to offset the results by</td>
	</tr>
	<tr>
		<td valign="top">amount</td>
		<td valign="top">Amount of content to pull, can be a maximum of 1000</td>
	</tr>
</table>
<p>The output will be a json array containing a boolean value of 'success', the total results for that type of media, and a sub-array containing the actual results of the query. You can adjust the number of displayed videos by using the &quot;amount&quot; parameter, and paginate the results by using the &quot;offset&quot; parameter.</p>
<h3>&raquo; media.search</h3>
<p>This endpoint allows you to run search queries on the website.<br />
Sample Request: <? echo $basehttp; ?>/api/?output=json&amp;command=media.search&amp;q=SEARCH_STRING&amp;type=videos&amp;offset=0&amp;amount=10<br />
<br />
The endpoint accepts the following parameters:</p>




<table width="500" border="1" cellspacing="0" cellpadding="5">
	<tr>
		<td valign="top">output</td>
		<td valign="top">Must be set to &quot;json&quot;. Currently, this is the only available output format.</td>
	</tr>
	<tr>
		<td width="104" valign="top">command</td>
		<td width="396" valign="top">Must be set to &quot;media.search&quot;</td>
	</tr>
	<tr>
		<td valign="top">type</td>
		<td valign="top">The type of media to display. Must be &quot;videos&quot; or &quot;galleries&quot;.</td>
	</tr>
	<tr>
		<td valign="top">q</td>
		<td valign="top">The search string query. Must be at least 3 characters long.</td>
	</tr>
	<tr>
		<td valign="top">offset</td>
		<td valign="top">Number of media to offset the results by</td>
	</tr>
	<tr>
		<td valign="top">amount</td>
		<td valign="top">Amount of content to pull, can be a maximum of 1000</td>
	</tr>
</table>
<p>The output will be a json array containing a boolean value of 'success', the total results for your query for that type of media, and a sub-array containing the actual results of the query. You can adjust the number of displayed videos by using the &quot;amount&quot; parameter, and paginate the results by using the &quot;offset&quot; parameter.</p>
<h3>&raquo; media.data</h3>
<p>This end point lets you fetch information about a specific video..<br />
Sample Request: <? echo $basehttp; ?>/api/?output=json&amp;command=media.data&amp;id=NUMERIC_MEDIA_ID<br />
<br />
The endpoint accepts the following parameters:</p>
<table width="500" border="1" cellspacing="0" cellpadding="5">
	<tr>
		<td valign="top">output</td>
		<td valign="top">Must be set to &quot;json&quot;. Currently, this is the only available output format.</td>
	</tr>
	<tr>
		<td width="104" valign="top">command</td>
		<td width="396" valign="top">Must be set to &quot;media.data&quot;</td>
	</tr>
	<tr>
		<td valign="top">id</td>
		<td valign="top">Numeric ID of a video</td>
	</tr>
</table>
<p>The output will be a json array containing a boolean value of 'success', and a sub-array containing the actual results of the query.</p>
<?
getTemplate('template.overall_footer.php');
exit();
?>