apiKey
This commit is contained in:
@@ -4,4 +4,16 @@ namespace Nwb\MultiDownloaderClient;
|
||||
|
||||
class MultiDownloaderClient
|
||||
{
|
||||
private string $apiKey;
|
||||
|
||||
public function __construct(string $apiKey = null)
|
||||
{
|
||||
$apiKey = $apiKey ?? getenv('MULTI_DOWNLOADER_API_KEY');
|
||||
|
||||
if (!$apiKey) {
|
||||
throw new \InvalidArgumentException('API key is required');
|
||||
}
|
||||
|
||||
$this->apiKey = $apiKey;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user