The Comet Server API allows you to create and manage customer accounts on your Comet Server.
Comet Licensing Ltd makes this library freely available under the MIT license; you may embed it in any PHP project, either free or commercial, as long as the copyright header comment remains intact in the *.php
files.
- Full coverage of Comet Server API methods, data structures, and constant definitions
- Easy synchronous API requests via the
\Comet\Server
class - PSR-7 support for asynchronous / Promise requests
- PHP 7.x type hints. For PHP 5.x compatibility, please use the last v3.x SDK release.
This library uses Semantic Versioning. However, large parts of this library are autogenerated from internal protocol descriptions from a specific version of Comet Server; to find the source Comet Server version, check the \Comet\Def::APPLICATION_VERSION
constant.
Newer API libraries can be safely used with older versions of Comet Server, however some features may be unavailable, and any new API properties will be unrecognised and ignored by the Comet Server.
Older API libraries can be safely used with newer versions of Comet Server. Unknown API properties corresponding to new Comet Server features will be preserved via the __unknown_properties
system.
Install via Composer:
composer require cometbackup/comet-php-sdk
List all user accounts:
<?php
require 'vendor/autoload.php'; // Load Composer classes
$server = new \Comet\Server("http://127.0.0.1:8060/", "admin", "admin");
$accounts = $server->AdminListUsers();
var_dump($accounts);
This package uses PHPUnit for testing.
- Copy the
phpunit.xml.dist
file tophpunit.xml
and modify theCOMET_SERVER
variables to point at your test Comet Server - Run
phpunit
Lint all PHP files:
find ./Comet/ -name '*.php' -exec php -l {} \;
Bug reports and pull requests are welcome on GitHub at https://github.com/CometBackup/comet-php-sdk.
You may also submit issues via the ticket system at cometbackup.com.