public JObject UserExtInfo(string auth, string qquin, string vaid) { try { string para = @"[[7,{""item_num"":1,""items"":[{""qquin"":""#qquin#"",""area_id"":""#vaid#""}]}],[28,{""qquin"":""#qquin#"",""area_id"":""#vaid#""}],[29,{""qquin"":""#qquin#"",""area_id"":""#vaid#"",""top_mvp_type"":0}],[35,{""qquin"":""#qquin#"",""area_id"":""#vaid#"",""champion_id"":0}],[36,{""qquin"":""#qquin#"",""area_id"":""#vaid#""}]]" .Replace("#qquin#", qquin) .Replace("#vaid#", vaid); string referer = @"http://game.tgp.qq.com/lol/profile/v1602/overview.shtml?qquin=#qquin#&area_id=#area_id#" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); string url = @"http://api.pallas.tgp.qq.com/core/tcall?callback=jQuery17206660636231168173_#jqueryext#&p=#p#&_cache_time=#cache_time#" .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#p#", para) .Replace("#cache_time#", "300"); JObject jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JArray>()); return(json); } catch (Exception ex) { LogHelper.LogError("UserExtInfo", ex); return(APILib.Error(ex.Message)); } }
public JObject GetMastery(string auth, string qquin, string vaid) { Random random = new Random(); string referer = @"http://game.tgp.qq.com/lol/profile/v1602/talent.html?nid=45&qquin=#qquin#&area_id=#area_id#" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); string url = @"http://api.pallas.tgp.qq.com/core/get_player_mastery_spell?callback=jQuery#jquery#_#jqueryext#&area_id=#area_id#&qquin=#qquin#&get_type=2&dtag=runes&_=#t#" .Replace("#jquery#", "1111009980190638452" + random.Next(10, 99)) .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#t#", DateHelper.ConvertDateTime2Long12(DateTime.Now).ToString()) .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); JObject jo = null; try { jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JObject>()); return(json); } catch (Exception ex) { if (jo != null) { return(APILib.Iced(jo)); } LogHelper.LogInfo(referer + "\n" + url + "\n" + "return json is null"); LogHelper.LogError("GetMastery", ex); return(APILib.Error("接口 GetMastery 调用错误")); } }
public JObject UserHotInfo(string auth, string qquin, string vaid) { try { string referer = @"http://game.tgp.qq.com/lol/profile/v1602/overview.shtml?qquin=#qquin#&area_id=#area_id#" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); string url = "http://api.pallas.tgp.qq.com/core/get_user_hot_info?callback=jQuery111106649491745047271_#jqueryext#&area_id=#area_id#&qquin=#qquin#&_=#t#" .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#area_id#", vaid) .Replace("#qquin#", qquin) .Replace("#t#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()); JObject jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JObject>()); return(json); } catch (Exception ex) { LogHelper.LogError("UserHotInfo", ex); return(APILib.Error(ex.Message)); } }
public JObject CombatList(string auth, string qquin, string vaid, int pagesize, int p) { try { string para = @"[[3,{""qquin"":""#qquin#"",""area_id"":""#area_id#"",""bt_num"":""0"",""bt_list"":[],""champion_id"":0,""offset"":#offset#,""limit"":#limit#,""mvp_flag"":-1}]]" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid) .Replace("#limit#", pagesize.ToString()) .Replace("#offset#", (p * pagesize).ToString()); string callback = "jQuery17209483979241204745_#jqueryext#" .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()); string referer = @"http://api.tgp.qq.com/profile/v1602/overview.shtml?vuin=#vuin#&vaid=#vaid#" .Replace("#vuin#", qquin) .Replace("#vaid#", vaid); string url = @"http://api.pallas.tgp.qq.com/core/tcall?callback=#callback#&p=#p#&_=#t#" .Replace("#callback#", HttpUtility.UrlEncode(callback)) .Replace("#p#", HttpUtility.UrlEncode(para)) .Replace("#t#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()); JObject jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JArray>()); return(json); } catch (Exception ex) { LogHelper.LogError("CombatList", ex); return(APILib.Error(ex.Message)); } }
public JObject BattleSummaryInfo(string auth, string qquin, string vaid) { Random random = new Random(); string p = @"[[14,{""battle_type"":-1,""qquin"":""#qquin#"",""area_id"":""#area_id#""}],[44,{""sid"":5,""qquin"":""#qquin#"",""area_id"":""#area_id#""}],[44,{""sid"":4,""qquin"":""#qquin#"",""area_id"":""#area_id#""}],[44,{""sid"":3,""qquin"":""#qquin#"",""area_id"":""#area_id#""}],[44,{""sid"":2,""qquin"":""#qquin#"",""area_id"":""#area_id#""}],[44,{""sid"":1,""qquin"":""#qquin#"",""area_id"":""#area_id#""}]]" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); string referer = @"http://game.tgp.qq.com/lol/profile/v1602/overview.shtml?qquin=#qquin#&area_id=#area_id#"; string url = @"http://api.pallas.tgp.qq.com/core/tcall?callback=jQuery#jquery#_#jqueryext#&p=#p#&_cache_time=#cache_time#" .Replace("#p#", HttpUtility.UrlEncode(p)) .Replace("#jquery#", "1111009980190638452" + random.Next(10, 99)) .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#t#", DateHelper.ConvertDateTime2Long12(DateTime.Now).ToString()) .Replace("#cache_time#", "300");; JObject jo = null; try { jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JArray>()); return(json); } catch (Exception ex) { if (jo != null) { return(APILib.Iced(jo)); } LogHelper.LogInfo(referer + "\n" + url + "\n" + "return json is null"); LogHelper.LogError("BattleSummaryInfo", ex); return(APILib.Error("接口 BattleSummaryInfo 调用错误")); } }
public JObject GameDetail(string auth, string qquin, string vaid, string gameid) { Random random = new Random(); string para = @"""area_id"":""#area_id#"",""game_id"":#game_id#" .Replace("#area_id#", vaid) .Replace("#game_id#", gameid) .Replace(@"""", HttpUtility.UrlEncode(@"""")); string referer = @"http://game.tgp.qq.com/lol/profile/v1602/history.shtml?qquin=#vuin#&area_id=#vaid#&game_id=#game_id#&battle_type=0&champion_id=0&cur_page=1" .Replace("#vuin#", qquin) .Replace("#vaid#", vaid) .Replace("#game_id#", gameid); string url = @"http://api.pallas.tgp.qq.com/core/get_battle_info?p={#p#}&callback=jQuery#jquery#_#jqueryext#&_=#t#" .Replace("#dtag#", qquin) .Replace("#p#", para) .Replace("#jquery#", "1111015899130702018" + random.Next(100, 999)) .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#t#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()); JObject jo = null; try { jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JObject>()); return(json); } catch (Exception ex) { if (jo != null) { return(APILib.Iced(jo)); } LogHelper.LogInfo(referer + "\n" + url + "\n" + "return json is null"); LogHelper.LogError("GameDetail", ex); return(APILib.Error("接口 GameDetail 调用错误")); } }
public JObject UserChampion(string auth, string qquin, string vaid) { string p = @"[[35,{""area_id"":""#area_id#"",""qquin"":""#qquin#""}]]" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); Random random = new Random(); string referer = @"http://game.tgp.qq.com/lol/profile/v1602/my_champs.shtml?nid=44&qquin=#qquin#&area_id=#area_id#" .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); string url = @"http://api.pallas.tgp.qq.com/core/tcall?callback=jQuery#jquery#_#jqueryext#&p=#p#&_=#t#" .Replace("#jquery#", "1111009980190638452" + random.Next(10, 99)) .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#p#", HttpUtility.UrlEncode(p)) .Replace("#t#", DateHelper.ConvertDateTime2Long12(DateTime.Now).ToString()) .Replace("#qquin#", qquin) .Replace("#area_id#", vaid); JObject jo = null; try { jo = APILib.GetJSON(referer, url, auth); //正常调用并返回 JObject json = APILib.Iced(jo["data"].ToObject <JArray>()); return(json); } catch (Exception ex) { if (jo != null) { return(APILib.Iced(jo)); } LogHelper.LogInfo(referer + "\n" + url + "\n" + "return json is null"); LogHelper.LogError("UserChampion", ex); return(APILib.Error("接口 UserChampion 调用错误")); } }
public JObject UserArea(string auth, string keyword) { try { string referer = @"http://game.tgp.qq.com/lol/search/v1603/search.html?kw=#kw#" .Replace("#kw#", HttpUtility.UrlEncode(keyword)); string url = @"http://api.pallas.tgp.qq.com/core/search_player?callback=jQuery1111026891932846046984_#jqueryext#&key=#key#&_=#t#" .Replace("#jqueryext#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()) .Replace("#key#", HttpUtility.UrlEncode(keyword)) .Replace("#t#", DateHelper.ConvertDateTime2Long13(DateTime.Now).ToString()); JArray jarray = new JArray(); JObject jo = APILib.GetJSON(referer, url, auth); JObject json = APILib.Iced(jo["data"].ToObject <JArray>()); return(json); } catch (Exception ex) { LogHelper.LogError("UserArea", ex); return(APILib.Error(ex.Message)); } }