Skip to content

Commit de73ca1

Browse files
authored
Fixed Conversations API docs (#234)
1 parent 410f38a commit de73ca1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

docs-src/conversations.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ in the ``types`` parameter.
102102
103103
sc.api_call("conversations.list")
104104
105-
Only public conversations are included by default. You can include DMs and MPIMs by passing
106-
``public_channel,private_channel`` as the ``types`` in your request.
105+
Only public conversations are included by default. You may include additional conversations types
106+
by passing ``types`` (as a string) into your list request. Additional conversation types include
107+
``public_channel`` and ``private_channel``.
107108

108109

109110
.. code-block:: python
@@ -113,9 +114,10 @@ Only public conversations are included by default. You can include DMs and MPIMs
113114
slack_token = os.environ["SLACK_API_TOKEN"]
114115
sc = SlackClient(slack_token)
115116
117+
# Note that `types` is a string
116118
sc.api_call(
117119
"conversations.list",
118-
types=["public_channel","private_channel"]
120+
types="public_channel, private_channel"
119121
)
120122
121123
See `conversations.list <https://api.slack.com/methods/conversations.list>`_ for more info.

docs/conversations.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,18 @@ <h2>Getting a list of conversations<a class="headerlink" href="#getting-a-list-o
211211
<span class="n">sc</span><span class="o">.</span><span class="n">api_call</span><span class="p">(</span><span class="s2">&quot;conversations.list&quot;</span><span class="p">)</span>
212212
</pre></div>
213213
</div>
214-
<p>Only public conversations are included by default. You can include DMs and MPIMs by passing
215-
<code class="docutils literal"><span class="pre">public_channel,private_channel</span></code> as the <code class="docutils literal"><span class="pre">types</span></code> in your request.</p>
214+
<p>Only public conversations are included by default. You may include additional conversations types
215+
by passing <code class="docutils literal"><span class="pre">types</span></code> (as a string) into your list request. Additional conversation types include
216+
<code class="docutils literal"><span class="pre">public_channel</span></code> and <code class="docutils literal"><span class="pre">private_channel</span></code>.</p>
216217
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">slackclient</span> <span class="kn">import</span> <span class="n">SlackClient</span>
217218

218219
<span class="n">slack_token</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s2">&quot;SLACK_API_TOKEN&quot;</span><span class="p">]</span>
219220
<span class="n">sc</span> <span class="o">=</span> <span class="n">SlackClient</span><span class="p">(</span><span class="n">slack_token</span><span class="p">)</span>
220221

222+
<span class="c1"># Note that `types` is a string</span>
221223
<span class="n">sc</span><span class="o">.</span><span class="n">api_call</span><span class="p">(</span>
222224
<span class="s2">&quot;conversations.list&quot;</span><span class="p">,</span>
223-
<span class="n">types</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;public_channel&quot;</span><span class="p">,</span><span class="s2">&quot;private_channel&quot;</span><span class="p">]</span>
225+
<span class="n">types</span><span class="o">=</span><span class="s2">&quot;public_channel, private_channel&quot;</span>
224226
<span class="p">)</span>
225227
</pre></div>
226228
</div>

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)