PHP code example of artifacia / artifacia-client-php
1. Go to this page and download the library: Download artifacia/artifacia-client-php 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/ */
artifacia / artifacia-client-php example snippets
composer
$api_key = <api_key>;
use Artifacia\Client;
$client = new Client($api_key);
$data = file_get_contents("./sample_data.json");
$data_indexing_response = $client->upload_item_data($data);
echo $data_indexing_response;
$sample_prod_id = 2761;
$num = 4;
$filters = array('color' => 1, 'pattern' => 1);
$query_response = $client->get_visual_recommendation($sample_prod_id, $num, $filters);
echo $query_response;