Skip to content

Commit 5386895

Browse files
author
Shane DeWael
authored
Merge pull request #477 from shanedewael/add_rtm_docs_v2
Add RTM section for docs v2
2 parents df5351f + 83294f9 commit 5386895

46 files changed

Lines changed: 2670 additions & 3504 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build/
33
dist/
44
docs/_sources/
55
docs/.doctrees
6+
.eggs/
67
*.egg-info/
78
*.egg
89
*.py[cod]

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Python slackclient
2+
23
The Python slackclient is a developer kit for interfacing with the Slack Web API and Real Time Messaging (RTM) API on Python 3.6 and above.
34

5+
**Comprehensive documentation on using the Slack Python can be found at [https://slack.dev/python-slackclient/](https://slack.dev/python-slackclient/)**
6+
47
[![pypi package][pypi-image]][pypi-url]
58
[![Build Status][travis-image]][travis-url]
69
[![Build Status][windows-build-status]][windows-build-url]
710
[![Python Version][python-version]][pypi-url]
811
[![codecov][codecov-image]][codecov-url]
912
[![contact][contact-image]][contact-url]
1013

11-
1214
Whether you're building a custom app for your team, or integrating a third party service into your Slack workflows, Slack Developer Kit for Python allows you to leverage the flexibility of Python to get your project up and running as quickly as possible.
1315

1416
The **Python slackclient** allows interaction with:
@@ -18,7 +20,7 @@ The **Python slackclient** allows interaction with:
1820

1921
If you want to use our [Events API][events-docs], please check the [Slack Events API adapter for Python][python-slack-events-api].
2022

21-
Details on the Tokens and Authentication can be found in our [Auth Guide][auth-guide].
23+
Details on the Tokens and Authentication can be found in our [Auth Guide][https://slack.dev/python-slackclient/auth.html].
2224

2325
## Table of contents
2426

@@ -30,19 +32,20 @@ Details on the Tokens and Authentication can be found in our [Auth Guide][auth-g
3032
* [Uploading files to Slack](#uploading-files-to-slack)
3133
* [Basic Usage of the RTM Client](#basic-usage-of-the-rtm-client)
3234
* [Async Usage](#async-usage)
33-
* [Slackclient as a script](slackclient-as-a-script)
34-
* [Slackclient in a framework](slackclient-in-a-framework)
35+
* [Slackclient as a script](#slackclient-as-a-script)
36+
* [Slackclient in a framework](#slackclient-in-a-framework)
3537
* [Advanced Options](#advanced-options)
3638
* [Migrating from v1.x](#migrating-from-v1)
3739
* [Support](#support)
3840

3941
### Requirements
42+
4043
---
44+
4145
This library requires Python 3.6 and above. If you require Python 2, please use our [SlackClient - v1.x][slackclientv1]. If you're unsure how to check what version of Python you're on, you can check it using the following:
4246

4347
> **Note:** You may need to use `python3` before your commands to ensure you use the correct Python path. e.g. `python3 --version`
4448
45-
4649
```bash
4750
python --version
4851

@@ -55,23 +58,23 @@ python3 --version
5558

5659
We recommend using [PyPI][pypi] to install the Slack Developer Kit for Python.
5760

58-
5961
```bash
6062
$ pip3 install slackclient
6163
```
6264

6365
### Getting started tutorial
66+
6467
---
6568

6669
We've created this [tutorial](/tutorial) to build a basic Slack app in less than 10 minutes. It requires some general programming knowledge, and Python basics. It focuses on the interacting with Slack's Web and RTM API. Use it to give you an idea of how to use this SDK.
6770

6871
**[Read the tutorial to get started!](/tutorial)**
6972

7073
### Basic Usage of the Web Client
71-
---
7274

73-
Slack provide a Web API that gives you the ability to build applications that interact with Slack in a variety of ways. This Development Kit is a module based wrapper that makes interaction with that API easier. We have a basic example here with some of the more common uses but a full list of the available methods are available [here][api-methods]. More detailed examples can be found in our [Basic Usage][basic-usage] guide
75+
---
7476

77+
Slack provide a Web API that gives you the ability to build applications that interact with Slack in a variety of ways. This Development Kit is a module based wrapper that makes interaction with that API easier. We have a basic example here with some of the more common uses but a full list of the available methods are available [here][api-methods]. More detailed examples can be found in our [Basic Usage][https://slack.dev/python-slackclient/basic_usage.html] guide
7578

7679
#### Sending a message to Slack
7780

@@ -92,7 +95,6 @@ One of the most common use-cases is sending a message to Slack. If you want to s
9295

9396
Here we also ensure that the response back from Slack is a successful one and that the message is the one we sent by using the `assert` statement.
9497

95-
9698
#### Uploading files to Slack
9799

98100
We've changed the process for uploading files to Slack to be much easier and straight forward. You can now just include a path to the file directly in the API call and upload it that way. You can find the details on this api call [here][files.upload]
@@ -110,6 +112,7 @@ We've changed the process for uploading files to Slack to be much easier and str
110112
```
111113

112114
### Basic Usage of the RTM Client
115+
113116
---
114117

115118
The [Real Time Messaging (RTM) API][rtm-docs] is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as users.
@@ -216,36 +219,39 @@ Interested in SSL or Proxy support? Simply use their built-in [SSL](https://docs
216219
```python
217220
import os
218221
import slack
219-
222+
220223
client = slack.WebClient(token=os.environ['SLACK_API_TOKEN'], ssl=sslcert, proxy=proxyinfo)
221224

222225
```
223226

224227
We will always follow the standard process in AIOHttp for those proxy and SSL settings so for more information, check out their documentation page linked [here][aiohttp].
225228

226229
### Migrating from v1
230+
227231
---
228-
If you're migrating from v1.x of slackclient to v2.x, Please follow our migration guide to ensure your app continues working after updating.
232+
233+
If you're migrating from v1.x of slackclient to v2.x, Please follow our migration guide to ensure your app continues working after updating.
229234

230235
**[Check out the Migration Guide here!](https://github.com/slackapi/python-slackclient/wiki/Migrating-to-2.x)**
231236

232237
### Support
238+
233239
---
234240

235241
If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:
236242

237243
Use our [Github Issue Tracker][gh-issues] for reporting bugs or requesting features.
238244
Visit the [Bot Developer Hangout][bd-hangout] for getting help using Slack Developer Kit for Python or just generally bond with your fellow Slack developers.
239245

240-
241246
<!-- Markdown links -->
247+
242248
[pypi-image]: https://badge.fury.io/py/slackclient.svg
243249
[pypi-url]: https://pypi.python.org/pypi/slackclient
244250
[windows-build-status]: https://ci.appveyor.com/api/projects/status/rif04t60ptslj32x/branch/master?svg=true
245251
[windows-build-url]: https://ci.appveyor.com/project/slackapi/python-slackclient
246252
[travis-image]: https://travis-ci.org/slackapi/python-slackclient.svg?branch=master
247253
[travis-url]: https://travis-ci.org/slackapi/python-slackclient
248-
[python-version]: https://img.shields.io/pypi/pyversions/slackclient.svg
254+
[python-version]: https://img.shields.io/pypi/pyversions/slackclient.svg
249255
[codecov-image]: https://codecov.io/gh/slackapi/python-slackclient/branch/master/graph/badge.svg
250256
[codecov-url]: https://codecov.io/gh/slackapi/python-slackclient
251257
[contact-image]: https://img.shields.io/badge/contact-support-green.svg

0 commit comments

Comments
 (0)