getGroupMemberListByJoinTimeFilter
Feature Introduction
Description
Fetches group member information of a specific group with the ability to filter by join time.
Note
- The caller must be a member of the group to invoke this.
- Since the data is retrieved locally from the APP, a single request should not exceed 10,000 members.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
Function Prototype
Future<List<GroupMembersInfo>> getGroupMemberListByJoinTime({
required String groupID,
int offset = 0,
int count = 0,
int joinTimeBegin = 0,
int joinTimeEnd = 0,
List<String> filterUserIDList = const [],
String? operationID,
})
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
groupID | String | Yes | Group ID |
offset | int | Yes | Starting offset for pagination |
count | int | Yes | Number of members per page |
joinTimeBegin | int | Yes | Earliest join time (unlimited if 0) |
joinTimeEnd | int | Yes | Latest join time (unlimited if 0) |
filterUserIDList | List<String> | No | List of group member userIDs to exclude |
Return Results
Parameter Name | Parameter Type | Description |
---|---|---|
~ | List<GroupMembersInfo> | Successful return |
Code Example
List<GroupMembersInfo> list = await OpenIM.iMManager.groupManager.getGroupMemberListByJoinTime(
groupID: 'groupId',
);
// todo
Function Prototype
- (void)getGroupMemberListByJoinTimeFilter:(NSString *)groupID
offset:(NSInteger)offset
count:(NSInteger)count
joinTimeBegin:(NSInteger)joinTimeBegin
joinTimeEnd:(NSInteger)joinTimeEnd
filterUserIDList:(NSArray <NSString *> *)filterUserIDList
onSuccess:(nullable OIMGroupMembersInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
groupID | NSString | Yes | Group ID |
offset | NSInteger | Yes | Starting offset for pagination |
count | NSInteger | Yes | Number of members per page |
joinTimeBegin | NSInteger | Yes | Earliest join time (unlimited if 0) |
joinTimeEnd | NSInteger | Yes | Latest join time (unlimited if 0) |
filterUserIDList | NSArray <NSString *> | Yes | List of group member userIDs to exclude |
Return Results
Parameter Name | Parameter Type | Description |
---|---|---|
onSuccess | NSArray< OIMGroupMemberInfo *> | Successful return |
onFailure | OIMFailureCallback | Failed return |
Code Example
[OIMManager.manager getGroupMemberListByJoinTimeFilter:@""
offset:0
count:100
joinTimeBegin:[NSDate new].timeIntervalSince1970
joinTimeEnd:[NSDate new].timeIntervalSince1970
filterUserIDList:@[]
onSuccess:^(NSArray<OIMGroupMemberInfo *> * _Nullable groupMembersInfo) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void getGroupMemberListByJoinTime(OnBase<List<GroupMembersInfo>> callBack, String groupID, int offset, int count, long joinTimeBegin, long joinTimeEnd, List<String> excludeUserIDList)
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
callBack | OnBase<List<GroupMembersInfo>> | Yes | Callback interface |
groupID | String | Yes | Group ID |
offset | int | Yes | Starting index |
count | int | Yes | Total count |
joinTimeBegin | int | Yes | Join start time |
joinTimeEnd | int | Yes | Join end time |
excludeUserIDList | List<String> | No | Exclude member IDs not to be queried |
Return Results
Code Example
OpenIMClient.getInstance().groupManager.getGroupMemberListByJoinTime(new OnBase<List<GroupMembersInfo>>() {
@Override
public void onError(int code, String error) {
}
@Override
public void onSuccess(List<GroupMembersInfo> data) {
}
}, groupID, offset, count, joinTimeBegin, joinTimeEnd, excludeUserIDList)
Function Prototype
IMSDK.getGroupMemberListByJoinTimeFilter({
groupID: string;
offset: number;
count: number;
joinTimeBegin: number;
joinTimeEnd: number;
filterUserIDList: string[];
}, operationID?: string): Promise<WsResponse<GroupMemberItem[]>>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
groupID | string | Yes | Group ID |
offset | number | Yes | Starting offset for pagination |
count | number | Yes | Number of members to fetch per page |
joinTimeBegin | number | Yes | Earliest join time, unrestricted if 0 |
joinTimeEnd | number | Yes | Latest join time, unrestricted if 0 |
filterUserIDList | string[] | Yes | List of group member userIDs to be excluded |
Return Results
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<WsResponse<GroupMemberItem[]>> | Group members list |
Promise.catch() | Promise<WsResponse> | Callback on failure |
Code Example
import { getSDK } from '@openim/wasm-client-sdk';
const IMSDK = getSDK();
// use in electron with ffi
// import { getWithRenderProcess } from '@openim/electron-client-sdk/lib/render';
// const { instance: IMSDK } = getWithRenderProcess();
// use in mini program
// import { getSDK } from '@openim/client-sdk';
// const IMSDK = getSDK();
IMSDK.getGroupMemberListByJoinTimeFilter({
groupID: '',
offset: 0,
count: 20,
joinTimeBegin: 0,
joinTimeEnd: 0,
filterUserIDList: ['userID'],
})
.then(({ data }) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
IMSDK.asyncApi("getGroupMemberListByJoinTimeFilter", operationID: string;
{
groupID: string;
offset: number;
count: number;
joinTimeBegin: number;
joinTimeEnd: number;
filterUserIDList: string[];
}
): Promise<GroupMemberItem[]>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, for issue tracking, should be unique. Recommended using the current time combined with a random number |
groupID | string | Yes | Group ID |
offset | number | Yes | Starting offset for pagination |
count | number | Yes | Number of members to fetch per page |
joinTimeBegin | number | Yes | Earliest join time, unrestricted if 0 |
joinTimeEnd | number | Yes | Latest join time, unrestricted if 0 |
filterUserIDList | string[] | Yes | List of group member userIDs to be excluded |
Return Results
Through the
openim-uniapp-polyfill
package, the function is Promise-ified. When calling, usethen
andcatch
to judge and handle success and failure callbacks respectively.
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<GroupMemberItem[]> | Group members list |
Promise.catch() | Promise<CatchResponse> | Callback on failure |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('getGroupMemberListByJoinTimeFilter', IMSDK.uuid(), {
groupID: '',
offset: 0,
count: 20,
joinTimeBegin: 0,
joinTimeEnd: 0,
filterUserIDList: ['userID'],
})
.then((data) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
OpenIMSDKRN.getGroupMemberListByJoinTimeFilter({
groupID: string,
offset: number,
count: number,
joinTimeBegin: number,
joinTimeEnd: number,
filterUserIDList: string[],
}, operationID: string): Promise<GroupMemberItem[]>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
groupID | string | Yes | Group ID |
offset | number | Yes | Starting offset for pagination |
count | number | Yes | Number of members to fetch per page |
joinTimeBegin | number | Yes | Earliest join time, unrestricted if 0 |
joinTimeEnd | number | Yes | Latest join time, unrestricted if 0 |
filterUserIDList | string[] | Yes | List of group member userIDs to be excluded |
operationID | string | Yes | Operation ID, used for problem location, keep unique, suggest using current time and random number |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<GroupMemberItem[]> | Group member list |
Promise.catch() | Promise<CatchResponse> | Callback on failed call |
Code Example
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.getGroupMemberListByJoinTimeFilter({
groupID: '',
offset: 0,
count: 20,
joinTimeBegin: 0,
joinTimeEnd: 0,
filterUserIDList: ['userID'],
}, 'operationID')
.then((data) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
public static void GetGroupMemberListByJoinTimeFilter(OnBase<List<GroupMember>> cb, string groupId, int offset, int count, long joinTimeBegin, long joinTimeEnd, string[] filterUserIDList)
Input Parameter
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
cb | OnBase<List<GroupMember>> | Yes | Callback |
groupId | string | Yes | Group ID |
offset | int | Yes | Starting offset for pagination |
count | int | Yes | Number of members to fetch per page |
joinTimeBegin | long | Yes | Earliest join time, unrestricted if 0 |
joinTimeEnd | long | Yes | Latest join time, unrestricted if 0 |
excludeUserIDList | string[] | 否 | Exclude member IDs not to be queried |
Return Result
Code Example
IMSDK.GetGroupMemberListByJoinTimeFilter((list,errCode,errMsg)=>{
},"groupId",0,0,0,0,{""});