Exemple #1
0
 public static function get($appKey, $secretKey)
 {
     $signer = new Signer($appKey, $secretKey);
     $client = new Client($appKey, $secretKey, new GuzzleClient());
     $client->setSigner($signer);
     return $client;
 }
Exemple #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', [], [], []);
 }