You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
547 B
21 lines
547 B
<?php
|
|
require('../vendor/autoload.php');
|
|
use Volc\Service\Iam;
|
|
|
|
$client = Iam::getInstance();
|
|
// call below method if you dont set ak and sk in ~/.volc/config
|
|
|
|
$client->setAccessKey($ak);
|
|
$client->setSecretKey($sk);
|
|
|
|
echo "\nDemo 1\n";
|
|
$response = $client->listUsers([]);
|
|
echo $response;
|
|
|
|
echo "\nDemo 2\n";
|
|
$response = $client->listUsers(['query'=>['Limit'=>10, 'Offset'=>0]]);
|
|
echo $response;
|
|
|
|
echo "\nDemo 3\n";
|
|
$response = $client->listUsers(['v4_credentials'=>['ak'=>"$ak", 'sk'=>$sk], 'query'=>['Limit'=>10, 'Offset'=>0]]);
|
|
echo $response; |