Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Api/AssetManager/AssetMediaFileApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(ResourceClientInterface $resourceClient, FileSystemI
/**
* {@inheritdoc}
*/
public function download($code): ResponseInterface
public function download(string $code): ResponseInterface
{
return $this->resourceClient->getStreamedResource(static::MEDIA_FILE_DOWNLOAD_URI, [$code]);
}
Expand Down
14 changes: 2 additions & 12 deletions src/Api/AssetManager/AssetMediaFileApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,12 @@

namespace Akeneo\Pim\ApiClient\Api\AssetManager;

use Akeneo\Pim\ApiClient\Api\Operation\DownloadableResourceInterface;
use Akeneo\Pim\ApiClient\Exception\HttpException;
use Akeneo\Pim\ApiClient\Exception\RuntimeException;
use Psr\Http\Message\ResponseInterface;

interface AssetMediaFileApiInterface
interface AssetMediaFileApiInterface extends DownloadableResourceInterface
{
/**
* Downloads an asset media file by its code
*
* @param string $code Code of the media file
*
* @throws HttpException If the request failed.
*
* @return ResponseInterface
*/
public function download($code): ResponseInterface;

/**
* Creates a new asset media file.
Expand Down