richellin/php-chat-invite-automation

Slack邀请自动化

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邀请自动化

示例

Laravel5 : laravel-slack-invite-automation

使用

"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();
}

测试

./vendor/bin/phpunit --tap tests

许可协议

MIT