/// <summary> /// 添加入群欢迎语素材 /// </summary> /// <param name="accessTokenOrAppKey"></param> /// <param name="data"></param> /// <param name="timeOut"></param> /// <returns></returns> public static async Task <GroupWelcomeTemplateAddResult> GroupWelcomeTemplateAddAsync(string accessTokenOrAppKey, GroupWelcomeTemplateAddRequest data, int timeOut = Config.TIME_OUT) { return(await ApiHandlerWapper.TryCommonApiAsync(async accessToken => { var url = string.Format(Config.ApiWorkHost + "/cgi-bin/externalcontact/group_welcome_template/add?access_token={0}", accessToken); return await CommonJsonSend.SendAsync <GroupWelcomeTemplateAddResult>(null, url, data, CommonJsonSendType.POST, timeOut).ConfigureAwait(false); }, accessTokenOrAppKey).ConfigureAwait(false)); }
/// <summary> /// 添加入群欢迎语素材 /// </summary> /// <param name="accessTokenOrAppKey"></param> /// <param name="data"></param> /// <param name="timeOut"></param> /// <returns></returns> public static GroupWelcomeTemplateAddResult GroupWelcomeTemplateAdd(string accessTokenOrAppKey, GroupWelcomeTemplateAddRequest data, int timeOut = Config.TIME_OUT) { return(ApiHandlerWapper.TryCommonApi(accessToken => { var url = string.Format(Config.ApiWorkHost + "/cgi-bin/externalcontact/group_welcome_template/add?access_token={0}", accessToken); return CommonJsonSend.Send <GroupWelcomeTemplateAddResult>(null, url, data, CommonJsonSendType.POST, timeOut); }, accessTokenOrAppKey)); }