跳到主要内容

searchGroupMembers

功能介绍

说明

通过关键词搜索某个群的群成员。

注意

(1)群成员才有搜索权限;
(2)至少需指定一个搜索域;
(3)多个域之间是或的关系。

函数原型


- (void)searchGroupMembers:(OIMSearchGroupMembersParam *)searchParam
onSuccess:(nullable OIMGroupMembersInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

输入参数

字段名称字段类型是否必填描述
SearchGroupMembersParam.groupIDNSString群ID
SearchGroupMembersParam.keywordListNSArray< NSString *>搜索关键词,目前仅支持一个关键词搜索,不能为空
SearchGroupMembersParam.isSearchUserIDBOOL是否以关键词搜索 UserID
SearchGroupMembersParam.isSearchMemberNicknameBOOL是否以关键词搜索昵称,默认 false
SearchGroupMembersParam.offsetNSInteger偏移量
SearchGroupMembersParam.countNSInteger数量

返回结果

参数名称参数类型描述
onSuccessNSArray< OIMGroupMemberInfo *>成功返回
onFailureOIMFailureCallback失败返回

代码示例


OIMSearchGroupMembersParam *param = [OIMSearchGroupMembersParam new];
param.groupID = @"";
param.keywordList = @[];
param.offset = 0;
param.count = 20;

[OIMManager.manager searchGroupMembers:param
onSuccess:^(NSArray<OIMGroupMemberInfo *> * _Nullable groupMembersInfo) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];