public async Task <NsisoLauncherVersionResponse> GetLatestLauncherVersion() { try { Dictionary <string, string> args = new Dictionary <string, string>(); args.Add("app_key", App_key); //表模型 args.Add("model_name", "VersionList"); //order args.Add("order", "[\"id DESC\"]"); //查询规则(ID>0) args.Add("where", "[[\"id\", \">\", \"0\"]]"); //仅返回一条(即ID最高的最新版本) args.Add("perpage", "1"); string result = await APIRequester.HttpPostReadAsStringForString(APIUrl + "?s=App.Table.FreeQuery", args); PhalApiClientResponse desObj = JsonConvert.DeserializeObject <PhalApiClientResponse>(result); JObject listJobj = desObj.Data; NsisoLauncherVersionListResponse list = listJobj.ToObject <NsisoLauncherVersionListResponse>(); return(list.List.FirstOrDefault()); } catch { return(null); } }
/// <summary> /// 异步报告日志 /// </summary> /// <param name="level">日志等级</param> /// <param name="log">日志内容</param> /// <returns></returns> public async Task PostLogAsync(Modules.LogLevel level, string log) { var escapeLog = Uri.EscapeDataString(log); Dictionary <string, string> args = new Dictionary <string, string>(); args.Add("app_key", App_key); args.Add("super_type", level.ToString()); args.Add("super_message", log); var result = await APIRequester.HttpPostReadAsStringForString(APIUrl + "?s=App.Market_SuperLogger.Record", args); Console.WriteLine(result); }