paravibe / gotowebinar
PHP的GoToWebinar API包装器
1.2.2
2023-03-14 12:27 UTC
Requires
- php: ^8.0 || ^7.0
- guzzlehttp/guzzle: ^7.0 || ^6.0
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is auto-updated.
Last update: 2024-09-14 15:27:17 UTC
README
安装
composer require paravibe/gotowebinar
如何使用
初始化客户端
$client = new \LogMeIn\GoToWebinar\Client($access_token, $values);
其中 $access_token
是在授权过程中获取的令牌 - https://goto-developer.logmeininc.com/how-get-access-token-and-organizer-key
而 $values
包含以下数据:
- account_key
- account_type
- firstName
- lastName
- organizer_key
通过在此处描述的任何方法 https://goto-developer.logmeininc.com/content/gotowebinar-api-reference-v2 使用适当的HTTP方法和端点传递给 createRequest()
方法。
GET/DELETE 方法
$get = $client->createRequest('GET', "organizers/{$organizer_key}/webinars")->execute(); $data = $get->getDecodedBody();
POST/PUT 方法
$post_data = array( 'subject' => 'TEST', 'description' => 'Test API integration', 'times' => array( array( 'startTime' => '2018-05-12T15:00:00Z', 'endTime' => '2018-05-12T16:00:00Z', ) ), 'timeZone' => 'Europe/Kiev', ); $new = $client->createRequest('POST', "organizers/{$organizer_key}/webinars") ->attachBody($post_data) ->execute();