typo3-canto/canto-api

Client library for Canto SaaS APIs.

1.0.4 2025-05-13 00:41 UTC

This package is auto-updated.

Last update: 2025-05-25 00:44:40 UTC


README

Fork information

This package is a fork of fairway/canto-saas-api.

It was forked to be able to extend and maintain a public version of Canto FAL TYPO3 extension.

Example usage

use TYPO3Canto\CantoApi\ClientOptions;
use TYPO3Canto\CantoApi\Client;
use TYPO3Canto\CantoApi\Http\LibraryTree\GetTreeRequest;

$clientOptions = new ClientOptions([
    'cantoName' => 'my-canto-name',
    'cantoDomain' => 'canto.de',
    'appId' => '123456789',
    'appSecret' => 'my-app-secret',
]);
$client = new Client($clientOptions);
$accessToken = $client->authorizeWithClientCredentials('my-user@email.com')
                      ->getAccessToken();
$client->setAccessToken($accessToken);
$allFolders = $client->libraryTree()
                     ->getTree(new GetTreeRequest())
                     ->getResults();