Skip to content

Commit a072126

Browse files
feat: add usergroups.update method (#326)
1 parent 183a98d commit a072126

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

src/api/usergroups.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ where
6868
)
6969
.await
7070
}
71+
72+
///
73+
/// https://api.slack.com/methods/usergroups.update
74+
///
75+
pub async fn usergroups_update(
76+
&self,
77+
req: &SlackApiUserGroupsUpdateRequest,
78+
) -> ClientResult<SlackApiUserGroupsUpdateResponse> {
79+
self.http_session_api
80+
.http_post("usergroups.update", req, Some(&SLACK_TIER2_METHOD_CONFIG))
81+
.await
82+
}
7183
}
7284

7385
#[skip_serializing_none]
@@ -96,3 +108,21 @@ pub struct SlackApiUserGroupsUsersListRequest {
96108
pub struct SlackApiUserGroupsUsersListResponse {
97109
pub users: Vec<SlackUserId>,
98110
}
111+
112+
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Builder)]
113+
pub struct SlackApiUserGroupsUpdateRequest {
114+
pub usergroup: SlackUserGroupId,
115+
pub additional_channels: Option<SlackChannelId>,
116+
pub channels: Option<SlackChannelId>,
117+
pub description: Option<String>,
118+
pub enable_section: Option<bool>,
119+
pub handle: Option<String>,
120+
pub include_count: Option<bool>,
121+
pub name: Option<String>,
122+
pub team_id: Option<SlackTeamId>,
123+
}
124+
125+
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Builder)]
126+
pub struct SlackApiUserGroupsUpdateResponse {
127+
pub usergroup: SlackUserGroup,
128+
}

0 commit comments

Comments
 (0)