richellin/php-chat-invite-automation

slack invite automation

0.0.4 2016-08-12 03:52 UTC

This package is not auto-updated.

Last update: 2024-09-23 12:10:49 UTC


README

  • Slack invite automation

Example

Laravel5 : laravel-slack-invite-automation

Use

"guzzlehttp/guzzle": "^6.2"

Composer

#composer.json
{
    "require": {
        "richellin/php-chat-invite-automation": "0.0.*"
    }
}

#install
composer install

PHP

<?php
require 'vendor/autoload.php';
use \richellin\chat\Invite;
use \richellin\chat\Channel\Slack;
$invite = new Invite();
$res = $invite->channel(new Slack())
              ->set([
                'team_name'=> 'Your team name',
                'email'=> 'Email',
                'channel'=> 'Channel',
                'token'=> 'xoxp-token'
                ])
              ->send();
if ($res === FALSE) {
    echo $invite->errMsg();
}

Test

./vendor/bin/phpunit --tap tests

Licence

MIT