使用teodortalov / citrix进行Citrix GoToWebinar API响应

时间:2015-12-06 01:28:59

标签: php rest citrix

感谢您抽出宝贵时间来回顾我的问题。

我一直在尝试实施Citrix Go2Webinar Api并找到了这个不错的框架:https://github.com/teodortalov/citrix

我已成功注册用户,但我无法弄清楚如何从API获得响应。

public function user_registration($user, $webinar_id)
        {
            $client = new \Citrix\Authentication\Direct([$this->api_key]);
            $client->auth($this->username, $this->password);

            $webinar = new \Citrix\GoToWebinar($client);

            $registration = array('firstName' => $user['first_name'], 'lastName' => $user['last_name'], 'email' => $user['email']);

            $registrant = $webinar->register($webinar_id, $registration);

            return $registrant;
        }

我得到的响应看起来像一堆受保护的变量。我的问题不应该是我能够调用一种方法来获得格式化的响应,这看起来像Citrix API期望返回的那样:

{
   "registrantKey": 0,
   "joinUrl": "string"
}

1 个答案:

答案 0 :(得分:0)

这些方法在consumer.php

$registrant = $webinar->register($webinar_id, $registration);
$myJoinUrl = $registration->getJoinUrl();
$myRegistrantKey = $registration->getId();