public function __construct($orgName, $apiKey = '') { if (is_a($orgName, 'Bouncefirst\\Hiveage\\Api\\Requestor')) { $this->requestor = $orgName; return; } $http = new Client(['base_url' => Requestor::getApiUrl($orgName)]); $http->setDefaultOption('verify', false); $requestor = new Requestor($http); $requestor->setKey($apiKey); $this->requestor = $requestor; }
public function testGetApiUrlOption() { $this->assertEquals(['base_url' => 'https://test.hiveage.com/api/'], Requestor::getApiUrlOption('test')); }