PHP code example of lupasearch / lupasearch-php-client
1. Go to this page and download the library: Download lupasearch/lupasearch-php-client 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/ */
lupasearch / lupasearch-php-client example snippets
$client = new \LupaSearch\LupaClient();
$client->setApiKey("your_api_key_here");
$lupaTasksApi = new \LupaSearch\Api\TasksApi($client);
$tasks = $lupaTasksApi->getTasks($indexId, [
'batchKey' => $importResponse['batchKey']
]);
$publicQueryKey = 'qraljpj1reo9';
$lupaPublicQueriesApi = new \LupaSearch\Api\PublicQueryApi($client);
$searchResponse = $lupaPublicQueriesApi->search($queryKey, [
'searchText' => '',
'filters' => ['category' => ['Accessories']]
]);