- Android
- iOS
- JavaScript
- Flutter
- ReactNative
Group Information Model
GroupInfo is the group information object provided by the SDK.
| Property | Type | Description | Version |
|---|---|---|---|
| groupId | String | Group ID. | 1.0.0 |
| groupName | String | Group name. | 1.0.0 |
| portrait | String | Group avatar URL. | 1.0.0 |
| extra | Map<String, String> | Extension fields. | 1.0.0 |
| updatedTime | long | Update timestamp. | 1.0.0 |
Get Group Information
//API definition
/**
* get group information
* @param groupId group ID
* @return group information
*/
GroupInfo getGroupInfo(String groupId);
//Example code
GroupInfo groupInfo = JIM.getInstance().getUserInfoManager().getGroupInfo("groupId");
Get Group Information in Batches
//API definition
/**
* get group information in batches
* @param groupIdList group ID list
* @return group information list
*/
List<GroupInfo> getGroupInfoList(List<String> groupIdList);
//Example code
GroupInfo groupInfo = JIM.getInstance().getUserInfoManager().getGroupInfo("groupId");
List<String> groupIdList = new ArrayList<>();
groupIdList.add("groupId1");
groupIdList.add("groupId2");
List<GroupInfo> groupInfoList = JIM.getInstance().getUserInfoManager().getGroupInfoList(groupIdList);
Fetch the Latest Group Information from the Server
//API definition
/**
* get the latest group information from the server
* @param groupId group ID
* @param callback result callback
*/
void fetchGroupInfo(String groupId, JIMConst.IResultCallback<GroupInfo> callback);
//Example code
JIM.getInstance().getUserInfoManager().fetchGroupInfo("groupId", new JIMConst.IResultCallback<GroupInfo>() {
@Override
public void onSuccess(GroupInfo groupInfo) {
}
@Override
public void onError(int errorCode) {
}
});
Group Information Model
JGroupInfo is the group information object provided by the SDK.
| Property | Type | Description | Version |
|---|---|---|---|
| groupId | NSString | Group ID. | 1.0.0 |
| groupName | NSString | Group name. | 1.0.0 |
| portrait | NSString | Group avatar URL. | 1.0.0 |
| extraDic | NSDictionary <NSString , NSString > | Extension fields. | 1.0.0 |
| updatedTime | long long | Update timestamp. | 1.0.0 |
Get Group Information
//API definition
/// get group information
/// - Parameter groupId: group ID
- (JGroupInfo *)getGroupInfo:(NSString *)groupId;
//Example code
JGroupInfo *groupInfo = [JIM.shared.userInfoManager getGroupInfo:@"groupId"];
Get Group Information in Batches
//API definition
/// get group information in batches
/// - Parameter groupIdList: group ID list
- (NSArray <JGroupInfo *> *)getGroupInfoList:(NSArray <NSString *> *)groupIdList;
//Example code
NSArray <JGroupInfo *> *groupInfoList = [JIM.shared.userInfoManager getGroupInfoList:@[@"groupId1", @"groupId2"]];
Fetch the Latest Group Information from the Server
//API definition
/// get the latest group information from the server
/// - Parameters:
/// - groupId: group ID
/// - successBlock: success callback
/// - errorBlock: failure callback
- (void)fetchGroupInfo:(NSString *)groupId
success:(void (^)(JGroupInfo *groupInfo))successBlock
error:(void (^)(JErrorCode code))errorBlock;
//Example code
[JIM.shared.userInfoManager fetchGroupInfo:@"groupId"
success:^(JGroupInfo *groupInfo) {
} error:^(JErrorCode code) {
}];
Group Information Model
GroupInfo is the group information object provided by the SDK.
| Property | Type | Description | Version |
|---|---|---|---|
| groupId | String | Group ID. | 1.0.0 |
| groupName | String | Group name. | 1.0.0 |
| portrait | String | Group avatar URL. | 1.0.0 |
| extraMap | Map<String, String>? | Extension fields. | 1.0.0 |
Get Group Information
//API definition
/**
* get group information
* @param groupId group ID
* @return group information
*/
Future<GroupInfo?> getGroupInfo(String groupId) async
//Example code
GroupInfo? groupInfo = await JuggleIm.instance.getGroupInfo("groupId");