Skip to content

Commit e1811b7

Browse files
zimegClaude
andauthored
feat: add apps.icon.set method (#2058)
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
1 parent 1b59fea commit e1811b7

4 files changed

Lines changed: 73 additions & 2 deletions

File tree

‎slack_sdk/web/async_client.py‎

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎slack_sdk/web/client.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,6 +2546,28 @@ def apps_event_authorizations_list(
25462546
kwargs.update({"event_context": event_context, "cursor": cursor, "limit": limit})
25472547
return self.api_call("apps.event.authorizations.list", params=kwargs)
25482548

2549+
def apps_icon_set(
2550+
self,
2551+
*,
2552+
app_id: str,
2553+
file: Optional[Union[str, bytes, IOBase]] = None,
2554+
url: Optional[str] = None,
2555+
**kwargs,
2556+
) -> SlackResponse:
2557+
"""Sets the app icon.
2558+
2559+
https://docs.slack.dev/reference/methods/apps.icon.set
2560+
2561+
Args:
2562+
app_id: The ID of the app whose icon you want to set.
2563+
file: File contents via `multipart/form-data`
2564+
url: URL of a publicly hosted image
2565+
"""
2566+
kwargs.update({"app_id": app_id, "url": url})
2567+
if file is not None:
2568+
return self.api_call("apps.icon.set", files={"file": file}, data=kwargs)
2569+
return self.api_call("apps.icon.set", params=kwargs)
2570+
25492571
def apps_uninstall(
25502572
self,
25512573
*,

‎slack_sdk/web/legacy_client.py‎

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)