vers-sdk v0.1.8
It is generated with Sterling.
- PHP >= 8.1
- ext-curl
- ext-json
composer require vers/sdk<?php
require_once 'vendor/autoload.php';
use VersSdk\VersSdkClient;
$client = new VersSdkClient(
apiKey: 'your-api-key',
);
// Example: call an API operation
// $result = $client->operationName();| Option | Description | Default |
|---|---|---|
baseUrl |
API base URL | https://api.vers.sh |
apiKey |
Bearer token for auth | VERS_API_KEY env var |
maxRetries |
Maximum retry attempts | 2 |
timeout |
Request timeout (seconds) | 30.0 |
use VersSdk\ApiException;
use VersSdk\NotFoundException;
try {
$result = $client->someOperation();
} catch (NotFoundException $e) {
echo "Not found: " . $e->getMessage();
} catch (ApiException $e) {
echo "API error ({$e->status}): " . $e->getMessage();
}MIT