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

0.1 2026-01-15 10:24 UTC

This package is auto-updated.

Last update: 2026-01-15 13:23:59 UTC


README

PHP wrapper for the Cloud Factory API

Requirements

PHP Version Require

Status

workflow Latest Stable Version Latest Unstable Version License

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