public static void DingMessage(string msg) { var dd = new DingClient(); string accessToken = dd.GetToken(dd.AppKey, dd.AppSecret); //log log.Info(msg); //ding DingHelper.SendMessage(dd.AgentId, accessToken, "收到新的消息", msg, dd.AdminUser); }
public string GetToken(string appKey, string appSecret) { return(DingHelper.GetAccessToken(appKey, appSecret)); }
public string AdminUser = System.Configuration.ConfigurationManager.AppSettings["AdminUser"]; //"manager8822"; public string GetTicket(string accessToken) { return(DingHelper.GetJSTicket(accessToken)); }