Search by

clearsoft / easysql-client

joao-jlcm

EasySQL API client package — auto-generated from the OpenAPI spec (client package of the PHP SDK).

v3.3.0 2026-10-11 04:04 UTC

This package is auto-updated.

Last update: 2026-10-11 04:24:47 UTC


README

Generated API client for the EasySQL API — the client package of the PHP SDK.

Status

🤖 Generated — src/Client.php, src/Models/ and docs/API.md are produced by scripts/generate.php from the OpenAPI spec at /openapi.json. Do not edit them by hand; regenerate with make generate from the repository root. CI (make check) fails when the generated files differ from a fresh regeneration.

The hand-written runtime in src/Exceptions/ and src/Http/ (required by the generated client) is never overwritten by the generator.

Installation

composer require clearsoft/easysql-client

Requirements: PHP >= 8.2, ext-json, guzzlehttp/guzzle ^7.0.

Usage

use Clearsoft\EasySQL\Client\Client;

$client = new Client([
    'base_url'     => 'https://api.easysql.net',
    'access_token' => 'your-access-token',
]);

$user = $client->me();
$connection = $client->getConnection('conn_abc123');

With automatic token refresh:

use Clearsoft\EasySQL\Client\Http\EasySQLClient;

$client = new EasySQLClient([
    'base_url'      => 'https://api.easysql.net',
    'access_token'  => $accessToken,
    'refresh_token' => $refreshToken,
]);
$client->setTokenStore(new MyTokenStore()); // implements Http\TokenStoreInterface

See docs/API.md for the full endpoint reference.