slakbal/citrix

该软件包已被弃用,不再维护。作者建议使用https://github.com/slakbal/gotowebinar软件包代替。

Laravel包,用于GoToWebinar的Citrix API包装器

1.0.5 2017-12-18 08:21 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:55:55 UTC


README

Citrix GotoWebinar API Provider for Laravel

该软件包是Laravel 5.1+的Citrix GotoWebinar API服务提供者和外观。它受到了Teodor Talov的Citrix API包装器包的启发。

安装

您可以使用Composer安装库

composer require slakbal/citrix

config/app.php文件中找到providers数组,并添加以下服务提供者

'providers' => [
  // ...
  Slakbal\Citrix\CitrixServiceProvider::class
];

现在在同一配置文件中找到aliases数组,并添加以下外观类

'aliases' => [
  // ...
  'GotoWebinar' => Slakbal\Citrix\Facade\GotoWebinar::class
];

配置

在使用Citrix服务提供者之前,您需要对其进行配置。您可以在以下位置创建API访问密钥: CITRIX开发者门户

请注意,您需要一个活动账户或试用账户才能使API正常工作。仅凭开发凭证不足以工作。

当前提供者仅支持直接身份验证。稍后也将添加OAuth2身份验证。

以下环境值需要在您的.env文件中设置。提供者不发布任何配置,因此您的项目保持干净。

CITRIX_DIRECT_USER=test@test.com
CITRIX_DIRECT_PASSWORD=testpassword
CITRIX_CONSUMER_KEY=123123123123

使用方法

研讨会资源

// Return list of all the Webinars
$webinars = GotoWebinar::getAllWebinars();


// Return the list of all upcoming Webinars
$webinars = GotoWebinar::getUpcomingWebinars();


// Return list of historical Webinars - date format standard: W3C - ISO 8601
$dateRange = [  'fromTime' => "2016-01-01T01:00:00Z",
                'toTime'   => "2016-03-23T20:00:00Z", ];

$webinars = GotoWebinar::getHistoricalWebinars( $dateRange );


// Return a specific Webinar
$webinar = GotoWebinar::getWebinar( $webinarKey );


// Create a Webinar - date format standard: W3C - ISO 8601
$webinar = [ 'subject'     => 'API Test 2',
             'description' => 'This Webinar is created via the API',
             'startTime'   => "2016-03-23T19:00:00Z",
             'endTime'     => "2016-03-23T20:00:00Z", ];

$webinar = GotoWebinar::createWebinar( $webinar );


// Update a Webinar - date format standard: W3C - ISO 8601
$webinar = [ 'subject'     => 'API Test 2.2',
             'description' => 'This Webinar is updated via the API',
             'startTime'   => "2016-03-24T19:00:00Z",
             'endTime'     => "2016-03-24T20:00:00Z", ];

$webinar = GotoWebinar::updateWebinar( $webinarKey, $params, $sendNotification = true);


// Delete a specific Webinar
$result = GotoWebinar::deleteWebinar( $webinarKey, $sendNotification = true );

与会者及注册者资源

// Return a list of attendees for a specific Webinar
$attendees = GotoWebinar::getWebinarAttendees( $webinarKey );


// Register an attendee for a specific Webinar
$webinarKey = '7102152795910768396';

$registrant = [ 'firstname'    => 'Peter',
                'lastname'     => 'Pan',
                'email'        => 'peter.pan@gmail.com',
                'organization' => 'Neverland', ];

$result = GotoWebinar::registerAttendee( $webinarKey, $registrant );


// Return a list of registrants for a specific Webinar
$registrants = GotoWebinar::getWebinarRegistrants( $webinarKey );


// Return a specific registrant from a specific Webinar
$registrant = GotoWebinar::getWebinarRegistrant( $webinarKey, $registrantKey );


// Remove a specific registrant from a specific Webinar
$result = GotoWebinar::deleteWebinarRegistrant( $webinarKey, $registrantKey );

会议资源

// Return list of sessions for the Organizer ()
$sessions = GotoWebinar::getOrganizerSessions();


// Return list of attendees for a specific Webinar and specific session
$attendees = GotoWebinar::getWebinarSessionAttendees( $webinarKey, $sessionKey );


// Return a specific attendee for a specific Webinar and specific session
$attendee = GotoWebinar::getWebinarSessionAttendee( $webinarKey, $sessionKey, $registrantKey );

欢迎您的贡献或错误修复!

下一步将是构建更健壮的错误处理,添加OAuth2身份验证,并将GoToMeeting提供者添加到包中。

享受!

Slakkie