-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API client replacement #20
Conversation
This PR makes #10 outdated and probably not needed. |
I'd very much like to see something like that! I've come up with the only solution of extending the API client with additional filters to $products = $this->apiClient->findProductsModifiedSince($sinceDate, [
'enabled' => [
['operator' => '=', 'value' => true],
],
'completeness' => [
['operator' => '>=', 'value' => 100, 'scope' => 'e4o'],
],
]); The API client for this proof of concept was changed like this: public function findProductsModifiedSince(\DateTime $date, array $filters = []): array
{
$search = [
'updated' => [
['operator' => '>', 'value' => $date->format('Y-m-d H:i:s')]
],
] + $filters;
$endpoint = sprintf(
'/api/rest/v1/products?search=%s&limit=20&page=1',
json_encode($search)
);
return $this->traversePagination($this->authenticatedRequest($endpoint, 'GET', []));
} I think this PR wouldn't change much, except for changing the signature to For my use case that would be enough as a first step and I wouldn't even need to decorate the API client, as decorating the Importer and passing the extender callback would be enough. What do you think? Edit: Oh, and btw, can I help you with anything? |
Hi @aleho, If you want to help with anything you can start by looking at the list of "help wanted" issues. Those with the "RFC" label require further discussion. |
Yes, of course, I saw this PR as a BC break anyways. I just wanted to let you know that a query extension point for the importer (for the time being) would be a nice addition to this PR. |
Replaced by #125 |
This PR will replace the API client using the official Akeneo PIM PHP SDK. This PR contains BC breaks!