Skip to content

Implementation Guide

Sergii Ivashchenko edited this page May 1, 2019 · 21 revisions

Authentication

To provide access to the Adobe Stock API it's required to implement authentication mechanisms:

  • API Key should be enough for images search and preview download. How to configure
  • oAuth2 for access to the licensed content. Documentation
  • API url

Backend Endpoints

  • Server to server image upload It should be possible to upload an image from the URL (that's how's preview working)
interface UploadImagePreviewInterface
{
    /**
     * @param string $url
     * @param ImageMetadataInterface $imageMetadata
     * @return bool
     */
    public function execute(string $url, ImageMetadataInterface $imageMetadata) : bool;
}
  • Upload image from base64 encoded string Provide the ability to upload an image from base64 encoded string (licensed image upload)
interface UploadLicensedImageInterface
{
    /**
     * @param string $encodedImage
     * @param ImageMetadataInterface $imageMetadata
     * @return bool
     */
    public function execute(string $encodedImage, ImageMetadataInterface $imageMetadata) : bool;
}

Configuration

To make at least search requests Adobe integration should be created. Provided API access information should be stored in Magento via standard configuration framework.

  • x-api-key - required field for any request (can be obtained from the Adobe integration configuration)
  • x-Product - can be obtained from the Adobe integration configuration (integration name)

Backend UI

  • Usage of Magento UI component is mandatory for the project.
  • Adobe Stock Image Integration should be implemented as default Magento slide out panel.

Clone this wiki locally