Skip to content

Commit

Permalink
Generate api-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Nov 17, 2022
1 parent e871811 commit 46ece5e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 23 deletions.
8 changes: 5 additions & 3 deletions docs/api-docs/slack_sdk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ <h2 id="note">Note</h2>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -2383,6 +2383,7 @@ <h2 id="note">Note</h2>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -8162,7 +8163,7 @@ <h3>Methods</h3>
</details>
</dd>
<dt id="slack_sdk.WebClient.chat_unfurl"><code class="name flex">
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Dict[str, Dict], user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="web/slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Optional[Dict[str, Dict]] = None, user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="web/slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
</code></dt>
<dd>
<div class="desc"><p>Provide custom unfurl behavior for user-posted URLs.
Expand All @@ -8178,7 +8179,7 @@ <h3>Methods</h3>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -8201,6 +8202,7 @@ <h3>Methods</h3>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_sdk/version.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_sdk.version</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-sdk/&#34;&#34;&#34;
__version__ = &#34;3.19.3&#34;</code></pre>
__version__ = &#34;3.19.4&#34;</code></pre>
</details>
</section>
<section>
Expand Down
11 changes: 7 additions & 4 deletions docs/api-docs/slack_sdk/web/async_client.html
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ <h1 class="title">Module <code>slack_sdk.web.async_client</code></h1>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -2183,6 +2183,7 @@ <h1 class="title">Module <code>slack_sdk.web.async_client</code></h1>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return await self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -6800,7 +6801,7 @@ <h2 id="note">Note</h2>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -6823,6 +6824,7 @@ <h2 id="note">Note</h2>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return await self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -12602,7 +12604,7 @@ <h3>Methods</h3>
</details>
</dd>
<dt id="slack_sdk.web.async_client.AsyncWebClient.chat_unfurl"><code class="name flex">
<span>async def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Dict[str, Dict], user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.async_slack_response.AsyncSlackResponse" href="async_slack_response.html#slack_sdk.web.async_slack_response.AsyncSlackResponse">AsyncSlackResponse</a></span>
<span>async def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Optional[Dict[str, Dict]] = None, user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.async_slack_response.AsyncSlackResponse" href="async_slack_response.html#slack_sdk.web.async_slack_response.AsyncSlackResponse">AsyncSlackResponse</a></span>
</code></dt>
<dd>
<div class="desc"><p>Provide custom unfurl behavior for user-posted URLs.
Expand All @@ -12618,7 +12620,7 @@ <h3>Methods</h3>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -12641,6 +12643,7 @@ <h3>Methods</h3>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return await self.api_call(&#34;chat.unfurl&#34;, json=kwargs)</code></pre>
Expand Down
11 changes: 7 additions & 4 deletions docs/api-docs/slack_sdk/web/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ <h1 class="title">Module <code>slack_sdk.web.client</code></h1>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -2174,6 +2174,7 @@ <h1 class="title">Module <code>slack_sdk.web.client</code></h1>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -6791,7 +6792,7 @@ <h2 id="note">Note</h2>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -6814,6 +6815,7 @@ <h2 id="note">Note</h2>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -12593,7 +12595,7 @@ <h3>Methods</h3>
</details>
</dd>
<dt id="slack_sdk.web.client.WebClient.chat_unfurl"><code class="name flex">
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Dict[str, Dict], user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Optional[Dict[str, Dict]] = None, user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
</code></dt>
<dd>
<div class="desc"><p>Provide custom unfurl behavior for user-posted URLs.
Expand All @@ -12609,7 +12611,7 @@ <h3>Methods</h3>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -12632,6 +12634,7 @@ <h3>Methods</h3>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)</code></pre>
Expand Down
8 changes: 5 additions & 3 deletions docs/api-docs/slack_sdk/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,7 @@ <h2 id="note">Note</h2>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -2594,6 +2594,7 @@ <h2 id="note">Note</h2>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)
Expand Down Expand Up @@ -8373,7 +8374,7 @@ <h3>Methods</h3>
</details>
</dd>
<dt id="slack_sdk.web.WebClient.chat_unfurl"><code class="name flex">
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Dict[str, Dict], user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
<span>def <span class="ident">chat_unfurl</span></span>(<span>self, *, channel: Optional[str] = None, ts: Optional[str] = None, source: Optional[str] = None, unfurl_id: Optional[str] = None, unfurls: Optional[Dict[str, Dict]] = None, user_auth_blocks: Union[str, Sequence[Union[Dict, <a title="slack_sdk.models.blocks.blocks.Block" href="../models/blocks/blocks.html#slack_sdk.models.blocks.blocks.Block">Block</a>]], ForwardRef(None)] = None, user_auth_message: Optional[str] = None, user_auth_required: Optional[bool] = None, user_auth_url: Optional[str] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
</code></dt>
<dd>
<div class="desc"><p>Provide custom unfurl behavior for user-posted URLs.
Expand All @@ -8389,7 +8390,7 @@ <h3>Methods</h3>
ts: Optional[str] = None,
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Dict[str, Dict],
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
Expand All @@ -8412,6 +8413,7 @@ <h3>Methods</h3>
&#34;user_auth_url&#34;: user_auth_url,
}
)
_parse_web_class_objects(kwargs) # for user_auth_blocks
kwargs = _remove_none_values(kwargs)
# NOTE: intentionally using json over params for API methods using blocks/attachments
return self.api_call(&#34;chat.unfurl&#34;, json=kwargs)</code></pre>
Expand Down
9 changes: 5 additions & 4 deletions docs/api-docs/slack_sdk/web/internal_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ <h1 class="title">Module <code>slack_sdk.web.internal_utils</code></h1>
return obj.to_dict()
return obj

blocks = kwargs.get(&#34;blocks&#34;, None)
if blocks is not None and isinstance(blocks, Sequence) and (not isinstance(blocks, str)):
dict_blocks = [to_dict(b) for b in blocks]
kwargs.update({&#34;blocks&#34;: dict_blocks})
for blocks_name in [&#34;blocks&#34;, &#34;user_auth_blocks&#34;]:
blocks = kwargs.get(blocks_name, None)
if blocks is not None and isinstance(blocks, Sequence) and (not isinstance(blocks, str)):
dict_blocks = [to_dict(b) for b in blocks]
kwargs.update({blocks_name: dict_blocks})

attachments = kwargs.get(&#34;attachments&#34;, None)
if attachments is not None and isinstance(attachments, Sequence) and (not isinstance(attachments, str)):
Expand Down
Loading

0 comments on commit 46ece5e

Please sign in to comment.