PHP code example of ecaretsolutions / scaledroner

1. Go to this page and download the library: Download ecaretsolutions/scaledroner 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/ */

    

ecaretsolutions / scaledroner example snippets


$auth = array(
    'channel_id' => 'CHANNEL_ID',
    'secret_key' => 'SECRET_KEY'
);

$client = ScaleDrone\Client::create($auth);

$auth = array(
    'channel_id' => 'CHANNEL_ID',
    'bearer' => 'GENERATED_JWT'
);

$client = ScaleDrone\Client::create($auth);

$room = 'notifications';
$message = ['email' => '[email protected]', 'name' => 'php name'];
$response = $client->publish($room, $message);

$response = $client->channel_stats();

$response = $client->members_list();

$response = $client->room_members_list('roomName');

$response = $client->all_room_members_list('roomName');
bash
$ php composer.phar update