示例#1
0
        public async Task <object> TinyGroupPush(ChatRequest.ChatGroupPullRequest request, SystemSession session)
        {
            var tinyGroupPush = new GroupPull {
                UserId = session.UserName, PageSize = request.PageSize, DrillUp = request.DrillUp, DrillDown = request.DrillDown, Limit = request.Limit, IncludeInstance = request.IncludeInstance, Cursor = request.Cursor
            };

            var response = await Task.Factory.StartNew(() => Client.ChatService.tinyGroupPush(tinyGroupPush, session.GetSession())).ConfigureAwait(false);

            return(JsonConvert.DeserializeObject(response));
        }
示例#2
0
        public async Task <StatusData <object> > GroupPull(ChatRequest.ChatGroupPullRequest request, SystemSession session)
        {
            var result = new StatusData <object> {
                Status = SystemDbStatus.Selected
            };

            var groupPull = new GroupPull {
                UserId = session.UserName, PageSize = request.PageSize, DrillUp = request.DrillUp, DrillDown = request.DrillDown, Limit = request.Limit, IncludeInstance = request.IncludeInstance, Cursor = request.Cursor
            };

            var response = await Task.Factory.StartNew(() => Client.ChatService.groupPull(groupPull, session.GetSession())).ConfigureAwait(false);

            Helper.Helper.ExtractData(result, response, "error", elementsToBypass: new Collection <string> {
                "error"
            });
            return(result);
        }