Download the PHP package markenwerk/slack-client without Composer
On this page you can find all versions of the php package markenwerk/slack-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download markenwerk/slack-client
More information about markenwerk/slack-client
Files in markenwerk/slack-client
Package slack-client
Short Description A basic Slack client library providing simple posting to Slack channels using the webhook API.
License MIT
Homepage http://markenwerk.net/
Informations about the package slack-client
PHP Slack Client
A basic Slack client library providing simple posting to Slack channels using the webhook API.
Installation
Usage
Autoloading and namesapce
Posting to a channel or member
The following example will post to a Slack channel or member looking like this:
Setup the API client
Setup a Slack message with attachments
Post to a channel
Post to a member
Exception handling
PHP Basic HTTP Client provides different exceptions – also provided by the PHP Common Exceptions project – for proper handling.
You can find more information about PHP Common Exceptions at Github.
Exceptions to be expected
In general you should expect that any setter method could thrown an \InvalidArgumentException
. The following exceptions could get thrown while using PHP Slack Client.
Markenwerk\CommonException\ParserException\StringifyException
on posting to SlackMarkenwerk\CommonException\NetworkException\UnexpectedResponseException
on posting to SlackMarkenwerk\CommonException\NetworkException\ConnectionTimeoutException
on posting to SlackMarkenwerk\CommonException\NetworkException\CurlException
on posting to Slack
Contribution
Contributing to our projects is always very appreciated.
But: please follow the contribution guidelines written down in the CONTRIBUTING.md document.
License
PHP Slack Client is under the MIT license.
All versions of slack-client with dependencies
markenwerk/basic-http-client Version ~3.0
markenwerk/common-exceptions Version ~3.0