public LinkedCorpMassResult SendText(SendTextData data) { var token = GetAccessToken(QyConfig.CorpID, QyConfig.CorpSecret); var result = LinkerCorpApi.SendText(token, data); return(result); }
public SendText(SendTextData data, bool alreadyEncrypted = false) : base() { Hidden = data.Hidden; BuildDomainModel(this, data, new HashSet <string> { "Text" }, alreadyEncrypted); }
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)); }
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)); }
public SendTextModel(SendTextData data) { Text = data.Text; Hidden = data.Hidden; }