Пример #1
0
 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;
 }
Пример #2
0
 public function testGetApiUrlOption()
 {
     $this->assertEquals(['base_url' => 'https://test.hiveage.com/api/'], Requestor::getApiUrlOption('test'));
 }