/// <summary> /// 获取自己的信息 /// </summary> internal static void Info_SelfInfo() { string url = "http://s.web2.qq.com/api/get_self_info2?t=#{t}".Replace("#{t}", AID_TimeStamp()); string dat = HTTP.Get(url, "http://s.web2.qq.com/proxy.html?v=20130916001&callback=1&id=1"); JsonFriendInfModel inf = (JsonFriendInfModel)JsonConvert.DeserializeObject(dat, typeof(JsonFriendInfModel)); SelfInfo.face = inf.result.face; SelfInfo.occupation = inf.result.occupation; SelfInfo.phone = inf.result.phone; SelfInfo.college = inf.result.college; SelfInfo.blood = inf.result.blood; SelfInfo.homepage = inf.result.homepage; SelfInfo.vip_info = inf.result.vip_info; SelfInfo.country = inf.result.country; SelfInfo.city = inf.result.city; SelfInfo.personal = inf.result.personal; SelfInfo.nick = inf.result.nick; SelfInfo.shengxiao = inf.result.shengxiao; SelfInfo.email = inf.result.email; SelfInfo.province = inf.result.province; SelfInfo.gender = inf.result.gender; if (inf.result.birthday.year != 0 && inf.result.birthday.month != 0 && inf.result.birthday.day != 0) { SelfInfo.birthday = new DateTime(inf.result.birthday.year, inf.result.birthday.month, inf.result.birthday.day); } }
/// <summary> /// 获取好友的详细信息 /// </summary> /// <param name="uin"></param> internal static void Info_FriendInfo(string uin) { string url = "http://s.web2.qq.com/api/get_friend_info2?tuin=#{uin}&vfwebqq=#{vfwebqq}&clientid=53999199&psessionid=#{psessionid}&t=#{t}".Replace("#{t}", AID_TimeStamp()); url = url.Replace("#{uin}", uin).Replace("#{vfwebqq}", vfwebqq).Replace("#{psessionid}", psessionid); string dat = HTTP.Get(url, "http://s.web2.qq.com/proxy.html?v=20130916001&callback=1&id=1"); JsonFriendInfModel inf = (JsonFriendInfModel)JsonConvert.DeserializeObject(dat, typeof(JsonFriendInfModel)); if (!FriendList.ContainsKey(uin)) { FriendList.Add(uin, new FriendInfo()); } FriendList[uin].face = inf.result.face; FriendList[uin].occupation = inf.result.occupation; FriendList[uin].phone = inf.result.phone; FriendList[uin].college = inf.result.college; FriendList[uin].blood = inf.result.blood; FriendList[uin].homepage = inf.result.homepage; FriendList[uin].vip_info = inf.result.vip_info; FriendList[uin].country = inf.result.country; FriendList[uin].city = inf.result.city; FriendList[uin].personal = inf.result.personal; FriendList[uin].nick = inf.result.nick; FriendList[uin].shengxiao = inf.result.shengxiao; FriendList[uin].email = inf.result.email; FriendList[uin].province = inf.result.province; FriendList[uin].gender = inf.result.gender; if (inf.result.birthday.year != 0 && inf.result.birthday.month != 0 && inf.result.birthday.day != 0) { FriendList[uin].birthday = new DateTime(inf.result.birthday.year, inf.result.birthday.month, inf.result.birthday.day); } }