<commit_before><?php
// Check that correct entry point was used
if (!defined('INDEX')) {
	exit();
}

require_once(ROOT_DIR . 'classes/output/BasicPage.php');

DEFINE('ACTIVE_PAGE', 'api-v1');
$apiV1Page = new BasicPage();
$apiV1Page->setPageTitleAddition('API v1');

$page_html = '<h1>API v1</h1>';
$page_html .= '<p>My Little Wallpaper offers a REST API for fetching wallpaper information with download links. The current API version is <strong>1.0</strong>.</p><p>Please note that version 2.0 with documentation will be released after My Little Wallpaper 2.0 is out of beta.</p>';
$page_html .= '<p>There are currently two kinds of requests:</p>';
$page_html .= '<ul>';
$page_html .= '<li>List: <a class="external" href="http://www.mylittlewallpaper.com' . PUB_PATH_CAT . '/c/all/api/v1/list.json">http://www.mylittlewallpaper.com' . PUB_PATH_CAT . '/c/all/api/v1/list.json</a></li>';
$page_html .= '<li>Random list: <a class="external" href="http://www.mylittlewallpaper.com' . PUB_PATH_CAT . '/c/all/api/v1/random.json">http://www.mylittlewallpaper.com' . PUB_PATH_CAT . '/c/all/api/v1/random.json</a></li>';
$page_html .= '</ul>';
$page_html .= '<h2>Request parameters</h2>';
$page_html .= '<p>You can give certain parameters to the calls in the URL, for example <a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=Fluttershy">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=Fluttershy</a></p>';
$page_html .= '<h3 style="margin:24px 0 2px 0;">The accepted parameters are the following:</h3>';
$page_html .= '<table class="parameter-table">';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>search</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags).</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity</a><br /><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/list.json?search=platform%3AMobile%2C+%3DPinkie+Pie">http://www.mylittlewallpaper.com/c/all/api/v1/list.json?search=platform%3AMobile%2C+%3DPinkie+Pie</a></p></td>';
$page_html .= '</tr>';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>searchAny</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags), match any.</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchAny=aspect%3A16%3A10%2Caspect%3A16%3A9">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchAny=aspect%3A16%3A10%2Caspect%3A16%3A9</a></p></td>';
$page_html .= '</tr>';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>searchExclude</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags), exclude from search.</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchExclude=Princess+Twilight">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity</a></p></td>';
$page_html .= '</tr>';<commit_msg>Fixed incorrect API example links<commit_after><?php
// Check that correct entry point was used
if (!defined('INDEX')) {
	exit();
}

require_once(ROOT_DIR . 'classes/output/BasicPage.php');

DEFINE('ACTIVE_PAGE', 'api-v1');
$apiV1Page = new BasicPage();
$apiV1Page->setPageTitleAddition('API v1');

$page_html = '<h1>API v1</h1>';
$page_html .= '<p>My Little Wallpaper offers a REST API for fetching wallpaper information with download links. The current API version is <strong>1.0</strong>.</p><p>Please note that version 2.0 with documentation will be released after My Little Wallpaper 2.0 is out of beta.</p>';
$page_html .= '<p>There are currently two kinds of requests:</p>';
$page_html .= '<ul>';
$page_html .= '<li>List: <a class="external" href="http://www.mylittlewallpaper.com' . PUB_PATH_CAT . 'api/v1/list.json">http://www.mylittlewallpaper.com' . PUB_PATH_CAT . 'api/v1/list.json</a></li>';
$page_html .= '<li>Random list: <a class="external" href="http://www.mylittlewallpaper.com' . PUB_PATH_CAT . 'api/v1/random.json">http://www.mylittlewallpaper.com' . PUB_PATH_CAT . 'api/v1/random.json</a></li>';
$page_html .= '</ul>';
$page_html .= '<h2>Request parameters</h2>';
$page_html .= '<p>You can give certain parameters to the calls in the URL, for example <a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=Fluttershy">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=Fluttershy</a></p>';
$page_html .= '<h3 style="margin:24px 0 2px 0;">The accepted parameters are the following:</h3>';
$page_html .= '<table class="parameter-table">';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>search</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags).</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity</a><br /><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/list.json?search=platform%3AMobile%2C+%3DPinkie+Pie">http://www.mylittlewallpaper.com/c/all/api/v1/list.json?search=platform%3AMobile%2C+%3DPinkie+Pie</a></p></td>';
$page_html .= '</tr>';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>searchAny</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags), match any.</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchAny=aspect%3A16%3A10%2Caspect%3A16%3A9">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchAny=aspect%3A16%3A10%2Caspect%3A16%3A9</a></p></td>';
$page_html .= '</tr>';
$page_html .= '<tr>';
$page_html .= '<td class="api-field"><h4>searchExclude</h4><em>optional</em></td>';
$page_html .= '<td class="api-description"><p>Search input (tags), exclude from search.</p><p>This parameter takes the same input you put to the search field on the website. For example:</p><p><a class="external" href="http://www.mylittlewallpaper.com/c/all/api/v1/random.json?searchExclude=Princess+Twilight">http://www.mylittlewallpaper.com/c/all/api/v1/random.json?search=author%3Aharwicks-art%2C+Rarity</a></p></td>';
$page_html .= '</tr>';
{'fraction_non_alphanumeric': 0.2074712643678161, 'fraction_numerical': 0.022413793103448276, 'mean_word_length': 5.912611717974181, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 28, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6839413', 'n_tokens_mistral': 2577, 'n_tokens_neox': 2530, 'n_words': 453}