inserve / cloud-factory-api-php
A PHP wrapper for the Cloud Factory API
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/inserve/cloud-factory-api-php
Requires
- php: ^8.3
- guzzlehttp/guzzle: ^7.7
- phpdocumentor/reflection-docblock: ^5.3
- psr/log: ^3.0
- symfony/property-access: ^6.3|^7
- symfony/serializer: ^6.3|^7
Requires (Dev)
- phpstan/phpstan: ^2
- phpunit/phpunit: ^12
- squizlabs/php_codesniffer: ^3.7
- vimeo/psalm: ^6
README
PHP wrapper for the Cloud Factory API
Requirements
Status
Cloud Factory Docs
Installation
composer require inserve/cloud-factory-api-php
Usage example
use GuzzleHttp\Client; use Inserve\CloudFactoryAPI\CloudFactoryAPIClient; require 'vendor/autoload.php'; $guzzle = new Client([ 'base_uri' => 'https://portal.api.cloudfactory.dk', ]); $cloudFactory = new CloudFactoryAPIClient( client: $guzzle, ); $accessToken = $api->exchangeRefreshToken('refresh.token'); $cloudFactory->setAccessToken($accessToken); if (! $cloudFactory->isAuthenticated()) { return; } $customerList = $cloudFactory->getCustomers([ 'PageSize' => 100 ]); foreach ($customerList->getResults() as $customer) { echo $customer->getName() . PHP_EOL; }