1. Go to this page and download the library: Download bloodlog/webinar-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Bloodlog\WebinarClient\WebinarClient;
$client = new WebinarClient();
$webinars = $client->events()->webinarsRequest(); // получаем все вебинары
// Здесь нам нужно найти нужный вебинар и взять у него eventSessions -> id
// Или можно воспользоваться полезным запросом ниже
use Bloodlog\WebinarClient\WebinarClient;
$client = new WebinarClient();
$webinars = $client->events()->webinarsList(); // получаем только eventSessionId и имя вебинара
// Response:[
// 'id' => 123, // $eventSession->id,
// 'name' => 'Новый вебинар', // $eventSession->name,
//]
$client = new WebinarClient();
$eventSessionId = 123;
$webinars = $client->events()->eventSessions($eventSessionId);
/* Получаем список полей и сохраняем ключи полей. Ключи нужно использовать при регистрации пользователей.
Response:{
"id": 123,
"name": "Новое мероприятие сегодня",
"additionalFields": [
{
"key": "cea75f8cd36a4f8567d5068b7e7e05e8",
"label": "referrer",
"type": "text",
"isRequired": true
}
],
}
*/
'api' => [
'registration' => [
'form-transform' => [ // webinar.ru использует ключи вместо наименования полей. После получения ключей для регистрации нужно сопоставить поля
'additionalFields' => [
'62899cefc8855544723baae88cbfce9c' => 'last_name', // Сопоставление по которому будет произведена замена
'62899cefc8855544723baae66cbfce2c' => 'company', // Сопоставление по которому будет произведена замена
],
],
],
],