public override string Execute(InfoBase json) { bool connect = false; string xml = string.Empty; try { //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); Para.Add("num", "4"); Para.Add("rand", "1"); string path = RequestPath.CreatePathApi("/txapi/weixin/wxhot"); RpArticles newList = HTMLHelper.Get <RpArticles>(path, Para, ref connect, ShareData.baiduapikey); if (newList.code == "200" && newList != null) { newList.xmlmsg = json; xml = new replyImageText().ReplyExecute(newList); } } catch (Exception ex) { TracingHelper.Error(ex, typeof(TouTiao), ex.Message); } return(xml); }
public override string Execute(InfoBase json) { bool connect = false; string xml = string.Empty; try { //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); //Para.Add("key", ShareData.QAkye); //Para.Add("info", json.Contents); //Para.Add("userid", ShareData.QAuserid); string path = RequestPath.CreatePathApi("/turing/turing/turing"); RpArticles newList = HTMLHelper.Get <RpArticles>(path, Para, ref connect, ShareData.baiduapikey); if (newList.code == "200" && newList != null) { newList.xmlmsg = json; xml = new replyImageText().ReplyExecute(newList); } } catch (Exception ex) { TracingHelper.Error(ex, typeof(DeepQA), ex.Message); } return(xml); }
public string Execute(string json) { bool connect = false; //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); Para.Add("corpid", ShareData.qyCorpID); Para.Add("corpsecret", ShareData.qySecret); string path = RequestPath.CreatePathqy(RequestType.qyaccess_token); RPGetaccess_token tokenInfo = HTMLHelper.Get <RPGetaccess_token>(path, Para, ref connect); if (tokenInfo != null) { ShareData.qyaccess_token = tokenInfo.access_token; } return(""); }
public string Execute(string json) { bool connect = false; //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); Para.Add("grant_type", "client_credential"); Para.Add("appid", ShareData.wxAppid); Para.Add("secret", ShareData.wxSecret); string path = RequestPath.CreatePath(RequestType.access_token); RPGetaccess_token tokenInfo = HTMLHelper.Get <RPGetaccess_token>(path, Para, ref connect); if (tokenInfo != null) { ShareData.wxaccess_token = tokenInfo.access_token; } return(""); }
public string Execute(string type) { bool connect = false; string path = string.Empty; try { //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); Para.Add("access_token", ShareData.wxaccess_token); RPGetIp_list IpListInfo = HTMLHelper.Get <RPGetIp_list>(path, Para, ref connect); if (IpListInfo == null || IpListInfo.errcode != null) { //重新请求access_token new GetAccess_token().Execute(""); } } catch (Exception ex) { TracingHelper.Error(ex, typeof(GetIp_list), path + ex.ToString()); } return(""); }
public override string Execute(InfoBase json) { bool connect = false; try { //组建参数字典 Dictionary <string, string> Para = new Dictionary <string, string>(); Para.Add("access_token", ShareData.wxaccess_token); string path = RequestPath.CreatePath(RequestType.Ip_list); RPGetIp_list IpListInfo = HTMLHelper.Get <RPGetIp_list>(path, Para, ref connect); if (IpListInfo == null && IpListInfo.errcode != null) { //重新请求access_token //new GetAccess_token().Execute(""); } } catch (Exception ex) { TracingHelper.Error(ex, typeof(Getjoke), ex.Message); } return(""); }