Skip to main content

searchGroupMembers

Feature Introduction

Explanation

Search for group members of a specific group using keywords.

Note

(1) Only group members have the permission to search; (2) At least one search domain must be specified; (3) Multiple domains are related by "OR".

Function Prototype


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

Input Parameters

Field NameField TypeRequiredDescription
SearchGroupMembersParam.groupIDNSStringYesGroup ID
SearchGroupMembersParam.keywordListNSArray< NSString *>YesSearch keyword, currently supports only one keyword search, cannot be empty
SearchGroupMembersParam.isSearchUserIDBOOLNoWhether to search by User ID
SearchGroupMembersParam.isSearchMemberNicknameBOOLNoWhether to search by Nickname, default is false
SearchGroupMembersParam.offsetNSIntegerNoOffset
SearchGroupMembersParam.countNSIntegerNoQuantity

Return Result

Parameter NameParameter TypeDescription
onSuccessNSArray< OIMGroupMemberInfo *>Return upon success
onFailureOIMFailureCallbackReturn upon failure

Code Example


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) {
}];