options
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user