Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public function testGetApiUrl()
 {
     $this->assertEquals('https://test.hiveage.com/api/', Requestor::getApiUrl('test'));
 }