1. Go to this page and download the library: Download bellenne/mpstats library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bellenne / mpstats example snippets
use Bellenne\MpStats\Api\Wildberries\ChoosingNiche;
$client = new ChoosingNiche('ВАШ_ТОКЕН', 'wb'); // wb - Wildberries
use Bellenne\MpStats\Api\Wildberries\ChoosingNiche;
use Bellenne\MpStats\Settings\Settings;
use Bellenne\MpStats\Settings\SortModel;
use Bellenne\MpStats\Settings\FilterModel;
use Bellenne\MpStats\Settings\Pagination;
// Создание клиента
$client = new ChoosingNiche('5a2a5f0e538dd5.66919148', 'wb');
// Настройки запроса
$sort = new SortModel();
$sort->addProperty('revenue', 'asc');
$filter = new FilterModel();
$filter->addNumericFilter('revenue', 'greaterThan', 10000);
$settings = new Settings(
new Pagination(0, 100),
$filter,
$sort
);
// Выполнение запроса
$result = $client->getSubjects('2261', $settings);
print_r($result);