nutama/mattermost-webhook

此包已被废弃且不再维护。未建议替代包。

PHP 客户端,用于向 Mattermost webhook 发送消息

1.0.1 2017-05-06 23:48 UTC

This package is not auto-updated.

Last update: 2023-05-13 19:37:45 UTC


README

PHP 客户端,用于向 Mattermost webhook 发送消息。

有关 Mattermost 入站 webhook 的文档,请参阅 https://docs.mattermost.com/developer/webhooks-incoming.html

Build Status SensioLabsInsight

安装 / 使用

通过 composer 安装最新版本

php composer.phar require nutama/mattermost-webhook

示例

<?php
require_once('vendor/autoload.php');

$webhook_uri        = 'http://{your-mattermost-site}/hooks/xxx-generatedkey-xxx';
$client             = new \GuzzleHttp\Client(['base_uri' => $webhook_uri]);
$mattermost_webhook = new \Nutama\MattermostWebhook\MattermostWebhook($client);
$message            = new \Nutama\MattermostWebhook\Message('message');

$mattermost_webhook->send($message);

要求

PHP 7.0.x 或更高版本。

许可协议

此库受 MIT 许可协议许可 - 详细信息请参阅 LICENSE 文件。