suspectdoubloon / slack-api
PHP wrapper for the Slack Events API and some other things I find necessary for my project
Installs: 10 341
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- guzzlehttp/guzzle: ~6.0@dev
This package is not auto-updated.
Last update: 2020-01-24 16:34:50 UTC
README
This project is a simple wrapper written in PHP using Guzzle 6 to request API endpoints as defined at Slack Api documentation. This is still a work in progress at the current point in the time, and I will filling the missing areas as I go along and when I need them in my own projects. So use at your own risk.
##What has been implemented
Currently I have implemented the methods under the following headers found in the
Slack Api documentation.
####Web
Namespace
- API
- Bots
- Channels
- Chat
- Group
- IM
- MPIM
- Users
##Including in your project
composer require suspectdoubloon/slack-api
and don't forget to include the autoload file in your project
include('vendor/autoload.php');
All methods in this package use the results from json_decode
.
Once you have generated the access token you can now use any of the classes located under the web namespace. See above for the currently available methods. Below is an example of getting a channel list.
use SuspectDoubloon\Slack\Web\ChannelClient;
$channelClient = new ChannelClient($token);
$channels = $channelClient->lists(true)->channels;
All methods will have the same number of arguments as the methods are defined as the slack API. The only exception is endpoints which send messages. Which will use an array for the argument list.
License
This package is open-sourced software licensed under the MIT license.