PHP library for interacting with slack

3.0.0 2024-06-14 14:46 UTC

This package is auto-updated.

Last update: 2024-12-14 16:03:42 UTC


README

This is a thin library for interacting with Slack. Currently, it supports sending messages and uploading files.

Installing

  • Run:
composer require talentrydev/slack

Usage example

$apiToken = ''; //generate the token in slack
$guzzleClient = new \GuzzleHttp\Client();
$slack = new \Talentry\Slack\SlackClient($apiToken, $guzzleClient);

$channel = $slack->getChannel('general');
if ($slackChannel !== null) {
    $slack->sendPlainTextMessage('Hello world!', $slackChannel);
}

Development

  • Install dependencies: make deps
  • Run tests: make test