Appearance
群聊
get_room_list
分页获取群聊列表。
python
result = wework.get_room_list(
client_id: int,
page_num: int = 1,
page_size: int = 10,
timeout: Optional[int] = None
)| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
client_id | int | - | 客户端 ID |
page_num | int | 1 | 页码 |
page_size | int | 10 | 每页数量 |
timeout | int | None | None | 超时时间 |
对应 type: 11038
get_room_members
分页获取群成员列表。
python
result = wework.get_room_members(
client_id: int,
conversation_id: str,
page_num: int = 1,
page_size: int = 10,
timeout: Optional[int] = None
)| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
client_id | int | - | 客户端 ID |
conversation_id | str | - | 群聊会话 ID |
page_num | int | 1 | 页码 |
page_size | int | 10 | 每页数量 |
timeout | int | None | None | 超时时间 |
对应 type: 11040
create_room
创建群聊。
python
result = wework.create_room(
client_id: int,
user_list: List[str],
timeout: Optional[int] = None
)| 参数 | 类型 | 说明 |
|---|---|---|
client_id | int | 客户端 ID |
user_list | List[str] | 用户 ID 列表 |
timeout | int | None | 超时时间 |
对应 type: 11058
create_empty_external_room
创建空外部群。
python
result = wework.create_empty_external_room(
client_id: int,
timeout: Optional[int] = None
)对应 type: 11125
modify_room_name
修改群名称。
python
result = wework.modify_room_name(
client_id: int,
conversation_id: str,
name: str,
timeout: Optional[int] = None
)| 参数 | 类型 | 说明 |
|---|---|---|
client_id | int | 客户端 ID |
conversation_id | str | 群聊会话 ID |
name | str | 新群名 |
timeout | int | None | 超时时间 |
对应 type: 11059
invite_room_members
批量邀请好友入群。
python
result = wework.invite_room_members(
client_id: int,
conversation_id: str,
user_list: List[str],
timeout: Optional[int] = None
)对应 type: 11060
remove_room_members
批量移除群成员。
python
result = wework.remove_room_members(
client_id: int,
conversation_id: str,
user_list: List[str],
timeout: Optional[int] = None
)对应 type: 11061
add_room_member_to_contact
将群成员添加为联系人。
python
result = wework.add_room_member_to_contact(
client_id: int,
room_conversation_id: str,
user_id: str,
corp_id: str,
verify: str,
timeout: Optional[int] = None
)对应 type: 11071
publish_room_notice
发布群公告。
python
result = wework.publish_room_notice(
client_id: int,
room_conversation_id: str,
notice: str,
timeout: Optional[int] = None
)对应 type: 11082
transfer_room_owner
转让群主。
python
result = wework.transfer_room_owner(
client_id: int,
room_conversation_id: str,
user_id: str,
timeout: Optional[int] = None
)对应 type: 11090
set_room_invite_confirmation
开启/关闭群邀请确认。
python
result = wework.set_room_invite_confirmation(
client_id: int,
room_conversation_id: str,
status: int, # 1=开启, 0=关闭
timeout: Optional[int] = None
)对应 type: 11089
set_room_name_modification
开启/关闭禁止修改群名。
python
result = wework.set_room_name_modification(
client_id: int,
room_conversation_id: str,
status: int, # 1=禁止, 0=允许
timeout: Optional[int] = None
)对应 type: 11108
leave_room
退出群聊。
python
result = wework.leave_room(
client_id: int,
room_conversation_id: str,
timeout: Optional[int] = None
)对应 type: 11105
dismiss_room
解散群聊。
python
result = wework.dismiss_room(
client_id: int,
room_conversation_id: str,
timeout: Optional[int] = None
)对应 type: 11130