Пример #1
0
 /**
  * Generate token.
  *
  * @return string
  * @throws \Exception
  */
 private function generateToken()
 {
     $username = $this->client->getUsername();
     $password = $this->client->getUserPassword();
     if ($username === null || $password === null) {
         throw new \Exception('Cannot refresh token.');
     }
     return $this->client->identityService()->getToken()->access->token->id;
 }
Пример #2
0
<?php

require dirname(__DIR__) . '/../vendor/autoload.php';
use keika299\ConohaAPI\Conoha;
$client = new Conoha();
$identityService = $client->identityService();
echo json_encode($identityService->getVersionInfo());
Пример #3
0
 public function testIdentityService()
 {
     $this->assertInstanceOf('\\keika299\\ConohaAPI\\Identity\\Service', $this->client->identityService());
 }