Stainless PHP API Library
Stainless PHP API Library
The Stainless PHP library provides convenient access to the Stainless REST API from any PHP 8.1.0+ application.
Installation
To use this package, install via Composer by adding the following to your application’s composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "git@github.com:stainless-sdks/stainless-v0-php.git"
}
],
"require": {
"org-placeholder/stainless-v0": "dev-main"
}
}
Usage
<?php
$client = new Client(
apiKey: getenv('STAINLESS_API_KEY') ?: 'My API Key', environment: 'staging'
);
$build = $client->builds->create(project: 'stainless', revision: 'main');
var_dump($build->id);