This commit is contained in:
mathieu_c committed 2024-01-11 12:42:03 +00:00
1 parent c7cd2fbbca
commit 4b11b32cbc
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -7,9 +7,9 @@ class MultiDownloaderClient
private string $apiUrl = 'https://multi-dl.kub.nwb.fr';
private string $apiKey;
public function __construct(string $apiKey = null)
public function __construct(array $options = [])
{
$apiKey = $apiKey ?? getenv('MULTI_DOWNLOADER_API_KEY');
$apiKey = $options['apiKey'] ?? getenv('MULTI_DOWNLOADER_API_KEY');
if (!$apiKey) {
throw new \InvalidArgumentException('API key is required');