Example #1
0
        /// <summary>
        /// 获取客服列表
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="type">不填时,同时返回内部、外部客服列表</param>
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static async Task<GetKFListResult> GetKFListAsync(string accessToken, KF_Type? type = null, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/kf/list?access_token={0}&type={1}", accessToken, type);

            return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<GetKFListResult>(null, url, null, CommonJsonSendType.GET, timeOut);
        }
Example #2
0
        /// <summary>
        /// 获取客服列表
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="type">不填时,同时返回内部、外部客服列表</param>
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static GetKFListResult GetKFList(string accessToken, KF_Type? type = null, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/kf/list?access_token={0}&type={1}", accessToken, type);

            return CommonJsonSend.Send<GetKFListResult>(null, url, null, CommonJsonSendType.GET, timeOut);
        }