예제 #1
0
        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);
        }
예제 #2
0
 public string GetToken(string appKey, string appSecret)
 {
     return(DingHelper.GetAccessToken(appKey, appSecret));
 }
예제 #3
0
        public string AdminUser = System.Configuration.ConfigurationManager.AppSettings["AdminUser"]; //"manager8822";

        public string GetTicket(string accessToken)
        {
            return(DingHelper.GetJSTicket(accessToken));
        }