示例#1
0
文件: Factory.php 项目: matiit/wkop
 public static function get($appKey, $secretKey)
 {
     $signer = new Signer($appKey, $secretKey);
     $client = new Client($appKey, $secretKey, new GuzzleClient());
     $client->setSigner($signer);
     return $client;
 }
示例#2
0
 public function testCanSendPostRequest()
 {
     $signerMock = $this->getSignerMock();
     // Ensure That request are signed twice (login and post)
     $signerMock->expects($this->exactly(2))->method('getSigningKey');
     $guzzleClient = new GuzzleClient();
     $client = new Client('FAKE KEY', 'FAKE SECRET KEY', $guzzleClient);
     $client->setSigner($signerMock);
     $client->setUserCredentials('login', 'acc key');
     $client->login();
     $client->post('/observatory', [], [], []);
 }