-
Notifications
You must be signed in to change notification settings - Fork 91
Service Contracts
Stanislav Idolov edited this page May 6, 2019
·
11 revisions
The search API endpoint is the main source of Adobe Stock assets and should be configurable and extensible. We encourage the re-usage of Magento framework interfaces is such cases.
interface GetImageListInterface
{
/**
* @param SearchCriteriaInterface $searchCriteria
* @return SearchResultsInterface
*/
public function execute(SearchCriteriaInterface $searchCriteria) : SearchResultsInterface;
}
The interface accepts search criteria object that implements generic framework interface: \Magento\Framework\Api\SearchCriteriaInterface
. The returned object will implement \Magento\Framework\Api\SearchResultsInterface
interface that also defined in Magento framework.
interface SaveImagePreviewInterface
{
/**
* @param int $mediaId
* @return bool
*/
public function execute(int $mediaId): bool;
}
interface SaveLicensedImageInterface
{
/**
* @param int $mediaId
* @return bool
*/
public function execute(int $mediaId): bool;
}