包含与群组和频道管理相关的 API 请求。
- Source:
Methods
(inner) createChannel(data) → {Promise.<object>}
创建当前群组的频道。
Parameters:
Name | Type | Description |
---|---|---|
data |
CreateChannelRequest | 请求体数据,包含频道名称和群组ID。 |
- Source:
Returns:
包含频道创建结果的 Promise 对象。
- Type
- Promise.<object>
(inner) createGroup(data) → {Promise.<object>}
创建群聊。
Parameters:
Name | Type | Description |
---|---|---|
data |
CreateGroupRequest | 请求体数据,包含群组名称和简介。 |
- Source:
Returns:
包含群组创建结果的 Promise 对象。
- Type
- Promise.<object>
(inner) deleteChannel(channelId) → {Promise.<object>}
删除当前所选频道。
Parameters:
Name | Type | Description |
---|---|---|
channelId |
string | 要删除的频道ID。 |
- Source:
Returns:
包含频道删除结果的 Promise 对象。
- Type
- Promise.<object>
(inner) disbandGroup(groupId) → {Promise.<object>}
解散群组。
Parameters:
Name | Type | Description |
---|---|---|
groupId |
string | 要解散的群组 ID。 |
- Source:
Returns:
包含解散操作结果的 Promise 对象。
- Type
- Promise.<object>
(inner) getChannelList(groupId) → {Promise.<object>}
获取当前群组的所有频道。
Parameters:
Name | Type | Description |
---|---|---|
groupId |
string | 群组的 ID。 |
- Source:
Returns:
包含频道列表的 Promise 对象。
- Type
- Promise.<object>
(inner) getGroupInvitations() → {Promise.<object>}
获取当前用户的群组邀请。
- Source:
Returns:
包含待处理群组邀请列表的 Promise 对象。
- Type
- Promise.<object>
(inner) getGroupMembers(groupId) → {Promise.<object>}
获取用户所属群组的所有用户(群组详情)。
Parameters:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
- Source:
Returns:
包含群组详细信息和成员列表的 Promise 对象。
- Type
- Promise.<object>
(inner) getUserGroups() → {Promise.<object>}
获取用户所有群组。
- Source:
Returns:
包含用户所属群组列表的 Promise 对象。
- Type
- Promise.<object>
(inner) groupInvitationResponse(data) → {Promise.<object>}
响应群组邀请(接受或拒绝)。
Parameters:
Name | Type | Description |
---|---|---|
data |
GroupInvitationResponseRequest | 响应数据,包含群组ID和操作动作。 |
- Source:
Returns:
包含响应结果的 Promise 对象。
- Type
- Promise.<object>
(inner) kickGroupMember(data) → {Promise.<object>}
踢除群组成员。
Parameters:
Name | Type | Description |
---|---|---|
data |
KickGroupMemberRequest | 踢人数据,包含群组ID和要移除的用户 ID。 |
- Source:
Returns:
包含踢人操作结果的 Promise 对象。
- Type
- Promise.<object>
(inner) searchGroupMembers(data) → {Promise.<object>}
模糊搜索群组成员。
Parameters:
Name | Type | Description |
---|---|---|
data |
SearchGroupMembersRequest | 搜索参数,包含群组ID、搜索关键字、页码和每页数量。 |
- Source:
Returns:
包含搜索结果列表的 Promise 对象。
- Type
- Promise.<object>
(inner) sendGroupInvitation(data) → {Promise.<object>}
批量邀请用户加入群组。
Parameters:
Name | Type | Description |
---|---|---|
data |
SendGroupInvitationRequest | 邀请数据,包含群组ID和被邀请的用户ID数组。 |
- Source:
Returns:
包含邀请结果的 Promise 对象。
- Type
- Promise.<object>
(inner) updateGroupInfo(data) → {Promise.<object>}
更新群组信息。
Parameters:
Name | Type | Description |
---|---|---|
data |
UpdateGroupInfoRequest | 更新数据,包含群组ID、新的群组名称和描述。 |
- Source:
Returns:
包含更新结果的 Promise 对象。
- Type
- Promise.<object>
(inner) uploadGroupAvatar(data) → {Promise.<object>}
上传群组头像。
Parameters:
Name | Type | Description |
---|---|---|
data |
UploadGroupAvatarRequest | 上传群组头像数据,包含群组ID和头像文件。 |
- Source:
Returns:
包含头像上传结果的 Promise 对象。
- Type
- Promise.<object>
Type Definitions
CreateChannelRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
name |
string | 频道名称。 |
groupId |
string | 群组ID。 |
- Source:
CreateGroupRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
name |
string | 群组名称。 |
description |
string | 群组简介。 |
- Source:
GroupInvitationResponseRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
action |
'accept' | 'decline' | 用户对群组邀请的响应,"accept"表示接受,"decline"表示拒绝。 |
- Source:
KickGroupMemberRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
memberId |
string | 要移除的用户 ID。 |
- Source:
SearchGroupMembersRequest
Type:
- object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
groupId |
string | 群组ID。 | ||
q |
string | 搜索关键字(匹配用户名)。 | ||
page |
number |
<optional> |
1 | 当前页码(默认为 1)。 |
limit |
number |
<optional> |
5 | 每页返回数量(默认为 5)。 |
- Source:
SendGroupInvitationRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
inviteeIds |
Array.<string> | 被邀请的用户ID数组。 |
- Source:
UpdateGroupInfoRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
name |
string | 新的群组名称(最长 10 个字符)。 |
description |
string | 群组简介(最长 15 个字符)。 |
- Source:
UploadGroupAvatarRequest
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
groupId |
string | 群组ID。 |
avatar |
FormData | 包含头像文件(字段名为 'avatar')的 FormData 对象。 |
- Source: