Exemple #1
0
        /// <summary>
        /// 生成JsAipTicket
        /// </summary>
        /// <param name="_accessToken"></param>
        /// <returns></returns>
        private string GetJsApiTicket(string _accessToken)
        {
            string re     = DdHttpHelper.Get(string.Format("https://oapi.dingtalk.com/get_jsapi_ticket?access_token={0}", _accessToken));
            string result = "";
            var    obj    = JsonConvert.DeserializeObject <Jsticket>(re);

            if (obj.Errcode == 0)
            {
                result = obj.Ticket;
            }

            return(result);
        }
Exemple #2
0
 public void SendMsg(DdMsg msg)
 {
     msg.agentid = myoper.AgentID;
     string result = DdHttpHelper.Post(url, msg.ToJsonString());
 }