这是我到目前为止得到的,但它不起作用。
public function getCompleteness(){
$searchBuilder = new AkeneoSearchBuilder();
$searchBuilder->addFilter('completeness', '=', 100);
try {
$products = $this->apiClient->getProductApi()->all(
50,
[
'search' => $searchBuilder->getFilters(),
'scope' => 'ecommerce'
]
);
} catch (HttpException $e){
echo "Message: " . $e->getMessage();
echo "Code: " . $e->getCode();
}
return $products;
}
}
这是我试图从 Akeneo API 使用的调用。
{{url}}/api/rest/v1/products?search={"completeness":[{"operator":"=","value":100,"scope":"ecommerce"}]}
如何使用 GetCompleteness() 方法来产生一些结果?我在使用 AkeneoSearchBuilder() 时遇到问题;