Citrix GoToWebinar API 响应 teodortalov/citrix

Citrix GoToWebinar API Response with teodortalov/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 期望的 return:

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

这些方法在consumer.php

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