1- # A PHP client for Slack's API
1+ # Introduction
22
3- There is a bunch of PHP clients for Slack. But some are not up to date or miss
4- features, some only cover a small part of the API and most are simply no longer
5- maintained.
3+ This library is a ** PHP client** for ** Slack's Web API** .
4+
5+ There is a bunch of existing PHP clients for Slack. But some are not up to date
6+ or miss features, some only cover a small part of the API and most are simply
7+ no longer maintained.
68
79This SDK is generated automatically with [ JanePHP] ( https://github.com/janephp/janephp )
810from the [ official Slack API specs] ( https://github.com/slackapi/slack-api-specs ) .
911
10- It provides a ** full object oriented interface** for all the endpoints, requests and responses of the Slack Web API.
12+ It also provides a ** full object oriented interface** for all the endpoints,
13+ requests and responses of the Slack Web API.
1114
1215## Installation
1316
1417This library is built atop of [ PSR-7] ( https://www.php-fig.org/psr/psr-7/ ) and
1518[ PSR-18] ( https://www.php-fig.org/psr/psr-18/ ) . So you will need to install some
16- implementations for those interfaces.
19+ implementations for those standard interfaces.
1720
1821If no PSR-18 client or PSR-7 message factory is available yet in your project
1922or you don't know or don't care which one to use, just install some default:
@@ -28,35 +31,16 @@ You can now install the Slack client:
2831composer require jolicode/slack-php-api
2932```
3033
31- ## Usage
32-
33- First, you need to retrieve a token from Slack.
34-
35- Checkout Slack's documentation about [ all different kind of tokens] ( https://api.slack.com/authentication/token-types ) .
36- A good starting point is the [ Authentication Basics documentation] ( https://api.slack.com/authentication/basics ) .
37-
38- Then, use the factory that is provided to create the client:
34+ ## Quick start
3935
4036``` php
4137// $client contains all the methods to interact with the API
42- $client = JoliCode\Slack\ClientFactory::create($yourToken );
38+ $client = JoliCode\Slack\ClientFactory::create($yourSlackToken );
4339
4440$user = $client->usersInfo(['user' => 'U123AZER'])->getUser();
45-
46- dump($user);
4741```
4842
49- <p align =" center " >
50- <img src =" doc/images/model-sample.png " alt =" Sample user object " />
51- <p >
52-
53- Want more example or documentation? See the [ full documentation here] ( doc/index.md ) .
54-
55- ## Troubleshoots
56-
57- Got some problems using this library? Need a missing feature?
58- Do not hesitate to [ open an issue] ( https://github.com/jolicode/slack-php-api/issues )
59- and share it with us.
43+ Want more documentation or examples? See the [ full documentation here] ( https://jolicode.github.io/slack-php-api/#/docs/usage ) .
6044
6145## Further documentation
6246
0 commit comments