paravibe/adobe-connect-client

Adobe Connect API 的 PHP 客户端

3.1.6 2023-09-01 12:35 UTC

README

作者: https://github.com/brunogasparetto/AdobeConnectClient

Build Status

Adobe Connect API 客户端 v9.5.4

PHP 库,用于与 Adobe Connect Web 服务 通信。

实现了很多操作。其中一些是操作序列,例如 RecordingPasscode。

安装

该包可在 Packagist 上找到。您可以使用 Composer 进行安装

$ composer require brunogasparetto/adobe-connect-client

使用方法

use AdobeConnectClient\Connection\Curl\Connection;
use AdobeConnectClient\Client;

$connection = new Connection('https://hostname.adobeconnect.com');
$client =  new Client($connection);
$commonInfo = $client->commonInfo();

您可以在某些操作中使用过滤器排序器。

use AdobeConnectClient\Connection\Curl\Connection;
use AdobeConnectClient\Client;
use AdobeConnectClient\Entities\SCO;
use AdobeConnectClient\Filter;
use AdobeConnectClient\Sorter;

$connection = new Connection('https://hostname.adobeconnect.com');
$client =  new Client($connection);

$client->login('username', 'password');

$folderId = 123;

$filter = Filter::instance()
  ->dateAfter('dateBegin', new DateTimeImmutable())
  ->like('name', 'ClassRoom');

$sorter = Sorter::instance()
  ->asc('dateBegin');

$scos = $client->scoContents($folderId, $filter, $sorter);

实体、过滤器排序器使用 Fluent 接口。

AdobeConnectClient\Connection\Curl\Connection 类接受一个选项数组以配置 CURL。

use AdobeConnectClient\Connection\Curl\Connection;
use AdobeConnectClient\Client;

// For tests with no SSL
$connection = new Connection(
  'https://hostname.adobeconnect.com',
  [
    CURLOPT_SSL_VERIFYHOST => 0,
    CURLOPT_SSL_VERIFYPEER => 0,
  ]
);
$client =  new Client($connection);
$commonInfo = $client->commonInfo();

重要

所有客户端操作都是可抛出的。

use AdobeConnectClient\Connection\Curl\Connection;
use AdobeConnectClient\Client;
use AdobeConnectClient\Exceptions\NoAccessException;

$connection = new Connection('https://hostname.adobeconnect.com');
$client = new Client($connection);

// Throws NoAccessException if not logged in
$client->scoInfo(123);