jleehr / canto-saas-api
Client library for Canto SaaS APIs.
2.0.0
2026-06-03 14:52 UTC
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- psr/log: ^1.1 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpro/grumphp: ^2.5
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.0
README
A PHP library to interact with the Canto SaaS API.
This library was originally developed by eCentral
under the package name fairway/canto-saas-api. The original repository is no
longer available; this is the maintained continuation, published as
jleehr/canto-saas-api. The PHP namespace Fairway\CantoSaasApi is kept for
backward compatibility.
Installation
composer require jleehr/canto-saas-api
Example usage
use Fairway\CantoSaasApi\ClientOptions; use Fairway\CantoSaasApi\Client; use Fairway\CantoSaasApi\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();
License
MIT. See LICENSE. Original work © eCentral GmbH.