Skip to content

hdresearch/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orchestrator Control Plane API PHP SDK

vers-sdk v0.1.8

It is generated with Sterling.

Requirements

  • PHP >= 8.1
  • ext-curl
  • ext-json

Installation

composer require vers/sdk

Usage

<?php

require_once 'vendor/autoload.php';

use VersSdk\VersSdkClient;

$client = new VersSdkClient(
    apiKey: 'your-api-key',
);

// Example: call an API operation
// $result = $client->operationName();

Configuration

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

Error Handling

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();
}

License

MIT

About

Vers SDK — generated from the Vers OpenAPI spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages