PHP code example of meetdemio / demio-php-sdk
1. Go to this page and download the library: Download meetdemio/demio-php-sdk 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/ */
meetdemio / demio-php-sdk example snippets
$api_key = 'IG8a1PUHxa49rn3q250LVVkF84p5w03L';
$api_secret = '1Wf20cConSV1zFiw';
$client = new \Demio\Client($api_key, $api_secret);
$response = $client->ping();
echo $response->results()->pong;
$events = $client->events->getList();
if ($events->isSuccess()) {
if ($events->count() > 0) {
foreach ($events->results() as $event) {
echo "{$event->name} ({$event->id}) is {$event->status}<br>";
}
} else {
echo "Events not found<br>";
}
} else {
echo "Errors: {$events->implodeMessages()}<br>";
}
$register = $client->events->register([
'id' => 86, // Event ID
'name' => 'John Doe',
'email' => '[email protected] '
]);
if ($register->isSuccess()) {
$results = $register->results();
$webinar_join_link = $results->join_link;
} else {
echo $register->statusCode(), "<br>";
echo "Errors: ", $register->implodeMessages('<br>');
}
$register = $client->events->register([
'id' => 86, // Event ID
'date_id' => 1575, // Date ID
'name' => 'John Doe',
'email' => '[email protected] '
]);
$register = $client->events->register([
'ref_url' => 'https://my.demio.com/ref/nI7XKRaVfZdj9CyQ',
'name' => 'John Doe',
'email' => '[email protected] '
]);
$event = $client->events->getEvent(86);
$events->results(['assoc' => true]);
$client->call($endpoint, $params, $method);
$events = $client->call('events', [], 'GET');
var_dump($events->results());