Exemplo n.º 1
0
        public LinkedCorpMassResult SendText(SendTextData data)
        {
            var token  = GetAccessToken(QyConfig.CorpID, QyConfig.CorpSecret);
            var result = LinkerCorpApi.SendText(token, data);

            return(result);
        }
Exemplo n.º 2
0
 public SendText(SendTextData data, bool alreadyEncrypted = false) : base()
 {
     Hidden = data.Hidden;
     BuildDomainModel(this, data, new HashSet <string> {
         "Text"
     }, alreadyEncrypted);
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
 public SendTextModel(SendTextData data)
 {
     Text   = data.Text;
     Hidden = data.Hidden;
 }