nutama/mattermost-webhook

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP client to send messages to an incoming 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 client to send messages to a Mattermost webhook.

See https://docs.mattermost.com/developer/webhooks-incoming.html for the documentation of the incoming webhook of Mattermost.

Build Status SensioLabsInsight

Installation / Usage

Install the latest version via composer:

php composer.phar require nutama/mattermost-webhook

Example:

<?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);

Requirements

PHP 7.0.x or above.

License

This library is licensed under the MIT License - see the LICENSE file for details.