public async Task <List <FriendInfo> > GetFriendsAsync() { var result = (await PostRequestAsync("Api_GetFriendList", new { 响应QQ = QQ.ToString() }))["Result"]; return(result.SelectToken("result.0.mems").Select(v => new FriendInfo() { Id = v["uin"].ToObject <long>(), NickName = v["name"].ToString() }).ToList()); }
public async Task <bool> SendGroupMessageAsync(long groupId, SendingMessage message) { using (var client = HttpClientExtensions.CreateClient()) { await client.PostJsonAsync(ListenUrl + "Api_SendMsg", new { 响应QQ = QQ.ToString(), 信息类型 = MahuaMessageType.Group, 收信对象群_讨论组 = groupId.ToString(), 收信QQ = groupId.ToString(), 内容 = message.ToString(), 气泡ID = 0 }); } return(true); }
public async Task <bool> SendGroupMessageAsync(long groupId, SendingMessage message) { using (var client = HttpClientExtensions.CreateClient()) { //NMD为啥MPQ变成了 ‘响应的QQ’了,太不上心了吧 await client.PostJsonAsync(ListenUrl + "Api_SendMsg", new { 响应的QQ = QQ.ToString(), 信息类型 = MahuaMessageType.Group, 参考子类型 = 0, 收信对象群_讨论组 = groupId.ToString(), 收信对象 = groupId.ToString(), 内容 = message.ToString(), }); return(true); } }
private void CreatInfoArray() { infos = new string[QQGlobal.QQ_COUNT_GET_USER_INFO_FIELD]; infos[QQ_NUM] = QQ.ToString(); infos[NICK] = Nick; infos[COUNTRY] = Country; infos[PROVINCE] = Province; infos[ZIPCODE] = ZipCode; infos[ADDRESS] = Address; infos[TELEPHONE] = Telephone; infos[AGE] = Age.ToString(); infos[GENDER] = Gender; // 10. 姓名 infos[NAME] = Name; // 11. Email infos[EMAIL] = Email; // 12. 寻呼机sn,(sn是什么玩意,我也不知道) infos[PAGER_SN] = ""; // 13. 寻呼机号 infos[PAGER] = ""; // 14. 寻呼机服务提供商 infos[PAGER_SP] = ""; // 15. 寻呼机base num(也不清楚这是什么) infos[PAGER_BASE_NUM] = ""; // 16. 寻呼机类型 infos[PAGER_TYPE] = ""; // 17. 职业 infos[OCCUPATION] = Occupation; // 18. 主页 infos[HOMEPAGE] = HomePage; // 19. 认证类型(应该是被人加自己为好友的时候的认证类型把) infos[AUTH_TYPE] = ((int)AuthType).ToString(); // 20. unknown 1 infos[UNKNOWN_1] = ""; // 21. unknown 2 infos[UNKNOWN_2] = ""; // 22. 头像,头像是用一个数代表的,比如27, 因为QQ目录下的头像是从1开始编号的, // 但是这个头像的数字却是从0开始计数的。并且注意,QQ的目录下面每种头像都 // 有3个bmp,所以按数字这么一排,27应该是10-1.bmp infos[HEAD] = Head.ToString(); // 23. 手机号 infos[MOBILE] = Mobile; // 24. 手机类型 infos[MOBILE_TYPE] = ""; // 25. 介绍 infos[INTRO] = Intro; // 26. 城市 infos[CITY] = City; // 27. unknown 3 infos[UNKNOWN_3] = ""; // 28. unknown 4 infos[UNKNOWN_4] = ""; // 29. unknown 5 infos[UNKNOWN_5] = ""; // 30. is_open_hp infos[OPEN_HP] = ""; // 31. is_open_contact(通讯方式是否对其他人可见) infos[OPEN_CONTACT] = ((int)OpenContact).ToString(); // 32. 学校 infos[COLLEGE] = College; // 33. 星座 infos[HOROSCOPE] = Horoscope.ToString(); // 34. 生肖 infos[ZODIAC] = Zodiac.ToString(); // 35. 血型 infos[BLOOD] = Blood.ToString(); // 36. UserFlag infos[USER_FLAG] = UserFlag.ToString(); // 37. unknown 6,总是0x2D infos[UNKNOWN_6] = ""; }
public async Task <List <GroupInfo> > GetGroupsAsync() { var result = JToken.Parse((await PostRequestAsync("Api_GetGroupList", new { 响应QQ = QQ.ToString() }))["Result"].ToString() .Replace(");", string.Empty).Replace("_GetGroupPortal_Callback(", string.Empty)); return(result.SelectToken("data.group").Select(v => new GroupInfo() { GroupId = v["groupid"].ToObject <long>(), GroupName = v["groupname"].ToString() }).ToList()); }