예제 #1
0
        public LinkedCorpMassResult SendText(SendTextData data)
        {
            var token  = GetAccessToken(QyConfig.CorpID, QyConfig.CorpSecret);
            var result = LinkerCorpApi.SendText(token, data);

            return(result);
        }
예제 #2
0
 public SendText(SendTextData data, bool alreadyEncrypted = false) : base()
 {
     Hidden = data.Hidden;
     BuildDomainModel(this, data, new HashSet <string> {
         "Text"
     }, alreadyEncrypted);
 }
예제 #3
0
        public static LinkedCorpMassResult SendText(string accessTokenOrAppKey, SendTextData data, int timeOut = Config.TIME_OUT)
        {
            return(ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                JsonSetting jsonSetting = new JsonSetting(true);

                return Senparc.Weixin.CommonAPIs.CommonJsonSend.Send <LinkedCorpMassResult>(accessToken, _urlFormat, data, CommonJsonSendType.POST, timeOut, jsonSetting: jsonSetting);
            }, accessTokenOrAppKey));
        }
예제 #4
0
        public static async Task <LinkedCorpMassResult> SendTextAsync(string accessTokenOrAppKey, SendTextData data, int timeOut = Config.TIME_OUT)
        {
            return(await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
            {
                JsonSetting jsonSetting = new JsonSetting(true);

                return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync <LinkedCorpMassResult>(accessToken, _urlFormat, data, CommonJsonSendType.POST, timeOut, jsonSetting: jsonSetting).ConfigureAwait(false);
            }, accessTokenOrAppKey).ConfigureAwait(false));
        }
예제 #5
0
 public SendTextModel(SendTextData data)
 {
     Text   = data.Text;
     Hidden = data.Hidden;
 }