Introduction
carpediem/mattermost-webhook
is a simple library to ease sending incoming webhooks to Mattermost compliant services.
Highlights
- Simple API
- Fully documented
- Fully Unit tested
- Framework-agnostic
Build status
branch | status | minimum PHP version |
---|---|---|
master | PHP 7.0 | |
1.x | PHP 5.6 |
Basic usage
The code below will send a mattermost notification
<?php
require '/path/to/vendor/autoload.php';
use GuzzleHttp\Client as GuzzleClient;
use Carpediem\Mattermost\Webhook\Client;
use Carpediem\Mattermost\Webhook\Message;
$mattermost = new Client(new GuzzleClient());
$message = new Message('This is a *test*.');
$response = $mattermost->notify('https://your_mattermost_webhook_url', $message);
//$response is a Psr7\Http\Message\ResponseInterface.
Credits
This package is a fork from ThibaudDauce/mattermost-php improved by Carpediem
License
The MIT License (MIT). Please see LICENSE for more information.