Skip to main content

searchGroups

Feature Introduction

Description

Search for joined groups using keywords.

Note

(1) At least one search domain must be specified; (2) The relationship between multiple domains is "or".

Function Prototype


- (void)searchGroups:(OIMSearchGroupParam *)searchParam
onSuccess:(nullable OIMGroupsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeMandatoryDescription
OIMSearchGroupParam.keywordListNSArray< NSString *YesSearch keywords. Currently only supports a single keyword search and cannot be empty.
OIMSearchGroupParam.isSearchGroupIDBOOLNoWhether to search by group ID. Note: Both cannot be false at the same time. Default is false.
OIMSearchGroupParam.isSearchGroupNameBOOLNoWhether to search by group name. Default is false.

Return Results

Parameter NameParameter TypeDescription
onSuccessNSArray< OIMGroupInfo *Success return
onFailureOIMFailureCallbackFailure return

Code Example


OIMSearchGroupParam *param = [OIMSearchGroupParam new];
param.isSearchGroupName = YES;
param.keywordList = @[];

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