akeneo / api-php-client

PHP client of Akeneo PIM API

Home Page:https://packagist.org/packages/akeneo/api-php-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Operators for filters to search resources incomplete

wucherpfennig opened this issue · comments

Dear all

I have noticed that the operators are incomplete. Missing are the ones for completeness filtering on models.

https://api.akeneo.com/documentation/filter.html#on-completeness

BR wucherpfennig

Hi @wucherpfennig,

Thank you for your contribution! You're right, and we will have a look at it.
Stay tuned!

Regards,

The Akeneo development team,

Hi @wucherpfennig

You should be able to make it work like this:

$searchBuilder = new \Akeneo\Pim\ApiClient\Search\SearchBuilder();

// Third argument $value must be left null.
$searchBuilder->addFilter('completeness', 'ALL COMPLETE', null, ['locale' => 'en_US', 'scope' => 'ecommerce'])

$page = $client->getProductModelApi()->listPerPage(100, true, ['search' => $searchFilters]);

Although I agree there is room for improvement by making the call much more explicit, does it answers your initial comment?

Done in #226.
Thanks again!