21 lines
547 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;