// 创建好友分组,并添加好友进分组FriendGroupInfo param = new FriendGroupInfo{friendship_create_friend_group_param_name_array = new List<string>{"group_name"},friendship_create_friend_group_param_identifier_array = new List<string>{"user_id"}};TIMResult res = TencentIMSDK.FriendshipCreateFriendGroup(param, (int code, string desc, List<FriendResult> result, string user_data)=>{// 处理异步逻辑});
// 删除好友分组List<string> param = new List<string>{"user_id"};TIMResult res = TencentIMSDK.FriendshipDeleteFriendGroup(param, (int code, string desc, string user_data)=>{// 处理异步逻辑});
// 修改好友分组名字FriendshipModifyFriendGroupParam param = new FriendshipModifyFriendGroupParam{friendship_modify_friend_group_param_name = "old_group_name",friendship_modify_friend_group_param_new_name = "new_group_name"};TIMResult res = TencentIMSDK.FriendshipModifyFriendGroup(param, (int code, string desc, List<FriendResult> result, string user_data)=>{// 处理异步逻辑});
// 按分组名字获取好友分组信息List<string> param = new List<string>{"user_id"};TIMResult res = TencentIMSDK.FriendshipGetFriendGroupList(param, (int code, string desc, List<FriendGroupInfo> info_list, string user_data)=>{// 处理异步逻辑});
// 将用户添加到分组中FriendshipModifyFriendGroupParam param = new FriendshipModifyFriendGroupParam{friendship_modify_friend_group_param_name = "group_name",friendship_modify_friend_group_param_add_identifier_array = new List<string>{"user_id"}};TIMResult res = TencentIMSDK.FriendshipModifyFriendGroup(param, (int code, string desc, List<FriendResult> result, string user_data)=>{// 处理异步逻辑});
// 将要有从分组中删除FriendshipModifyFriendGroupParam param = new FriendshipModifyFriendGroupParam{friendship_modify_friend_group_param_name = "group_name",friendship_modify_friend_group_param_delete_identifier_array = new List<string>{"user_id"}};TIMResult res = TencentIMSDK.FriendshipModifyFriendGroup(param, (int code, string desc, List<FriendResult> result, string user_data)=>{// 处理异步逻辑});
文档反馈