2017 © Pedro Peláez
 

library scaledrone

Official ScaleDrone PHP pushing library

image

scaledrone/scaledrone

Official ScaleDrone PHP pushing library

  • Thursday, November 9, 2017
  • by herkyl
  • Repository
  • 3 Watchers
  • 5 Stars
  • 8,170 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 7 Versions
  • 8 % Grown

The README.md

ScaleDrone PHP

Official ScaleDrone PHP pushing library. This is a wrapper around the REST API., (*1)

Installation

Make sure you have composer installed., (*2)

Install it directly:, (*3)

composer require scaledrone/scaledrone

Or add the following to your composer.json:, (*4)

{
    "require": {
        "scaledrone/scaledrone": "*"
    }
}

Then update your dependencies:, (*5)

$ php composer.phar update

Usage

Create a new instance of ScaleDrone passing it the channel_id and secret_key that you can find from the channel's page, (*6)

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

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

If you wish to connect using a JSON Web Token you can set it like this:, (*7)

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

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

Publishing a message, (*8)

$room = 'notifications';
$message = ['email' => 'test2@foo.bar', 'name' => 'php name'];
$response = $client->publish($room, $message);

Channel stats, (*9)

$response = $client->channel_stats();

Getting the complete list of users from all rooms, (*10)

$response = $client->members_list();

Getting the list of users in a room, (*11)

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

Getting the list of rooms and their members, (*12)

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

Running Tests

Clone this repository and change directories to the repository root. Install all dependencies with composer install. Then, just run vendor/bin/phpunit., (*13)

The Versions

09/11 2017

dev-master

9999999-dev https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

The Development Requires

push publish scaledrone

09/11 2017

0.5.0

0.5.0.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

The Development Requires

push publish scaledrone

09/11 2017

0.4.0

0.4.0.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

The Development Requires

push publish scaledrone

26/03 2017

0.3.0

0.3.0.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

The Development Requires

push publish scaledrone

23/02 2017

0.2.0

0.2.0.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

push publish scaledrone

26/01 2016

0.1.1

0.1.1.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

push publish scaledrone

26/01 2016

0.1.0

0.1.0.0 https://www.scaledrone.com/

Official ScaleDrone PHP pushing library

  Sources   Download

MIT

The Requires

 

push publish scaledrone