public function Client::downloadFromQueue in Media: Acquia DAM 8
Gets asset download queue information.
This is a 2 step process: 1. Queue assets. 2. Download From Queue.
This step will allow users to download the queued asset using the download key returned from step1 (Queue asset process). The output of this step will be a download URL to the asset or the download status, if the asset is not ready for download.
Parameters
string $downloadKey: The download key to check the status of.
Return value
array An array of response data.
Throws
\GuzzleHttp\Exception\GuzzleException
\cweagans\webdam\Exception\InvalidCredentialsException
File
- src/
Client.php, line 344
Class
- Client
- Overridden implementation of the cweagans php-webdam-client.
Namespace
Drupal\media_acquiadamCode
public function downloadFromQueue($downloadKey) {
$this
->checkAuth();
$response = $this->client
->request('GET', $this->baseUrl . '/downloadfromqueue/' . $downloadKey, [
'headers' => $this
->getDefaultHeaders(),
]);
$response = json_decode((string) $response
->getBody(), TRUE);
return $response;
}