SDKs
Experimental
PHP
Use the loams/loams Composer package and make the first call from PHP.
The PHP SDK needs PHP 8.2 or newer. Loams\Client exposes one service object per module: instances, live, approvals and devices.
Not on Packagist yet
The 0.1.0 package is in the read-only split repository
ostrium-labs/loams-php (tag v0.1.0), which the
release workflow updates from sdks/php, but it is not listed on Packagist yet. Until it is,
add the split repository to Composer as below. Send changes to
sdks/php in the main repository.
Examples and package: github.com/ostrium-labs/loams-php · Source: sdks/php
Install
From the split repository, until the package is on Packagist:
composer config repositories.loams vcs https://github.com/ostrium-labs/loams-php
composer require loams/loams:0.1.0Once it is on Packagist, composer require loams/loams:0.1.0 alone is enough.
Quickstart
<?php
require 'vendor/autoload.php';
$client = new Loams\Client(
getenv('LOAMS_ENDPOINT') ?: 'http://127.0.0.1:8080',
new Loams\EnvTokenSource('LOAMS_API_KEY'),
);
// What this instance is; needs no credential.
$info = $client->instances->getInstance();
print_r($info);Develop
composer install
vendor/bin/phpunit