Skip to content

inserveit/cloud-factory-api-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Factory API

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

About

API Wrapper for Cloud Factory

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages