Esempio n. 1
0
 /// <summary>
 /// 获取企业全部的发表内容。
 /// </summary>
 /// <param name="accessTokenOrAppKey"></param>
 /// <param name="data"></param>
 /// <param name="timeOut"></param>
 /// <returns></returns>
 public static GetMomentListResult GetMomentList(string accessTokenOrAppKey, GetMomentListParam data, int timeOut = Config.TIME_OUT)
 {
     return(ApiHandlerWapper.TryCommonApi(accessToken =>
     {
         var url = string.Format(Config.ApiWorkHost + "/cgi-bin/externalcontact/get_moment_list?access_token={0}", accessToken);
         return CommonJsonSend.Send <GetMomentListResult>(null, url, data, CommonJsonSendType.POST, timeOut);
     }, accessTokenOrAppKey));
 }
Esempio n. 2
0
 /// <summary>
 /// 获取企业全部的发表内容。
 /// </summary>
 /// <param name="accessTokenOrAppKey"></param>
 /// <param name="data"></param>
 /// <param name="timeOut"></param>
 /// <returns></returns>
 public static async Task <GetMomentListResult> GetMomentListAsync(string accessTokenOrAppKey, GetMomentListParam data, int timeOut = Config.TIME_OUT)
 {
     return(await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
     {
         var url = string.Format(Config.ApiWorkHost + "/cgi-bin/externalcontact/get_moment_list?access_token={0}", accessToken);
         return await CommonJsonSend.SendAsync <GetMomentListResult>(null, url, data, CommonJsonSendType.POST, timeOut).ConfigureAwait(false);
     }, accessTokenOrAppKey).ConfigureAwait(false));
 }