public override async Task <MatchResponse> GetGlobalHistory(GetGlobalHistoryRequest request, ServerCallContext context)
        {
            var res = await _mongoDbService.GetGlobalHistory(request);

            var matchHistory = RemapMatchHistories(res);

            return(new MatchResponse
            {
                Data = { matchHistory },
                Pagaination = new PaginationResponse
                {
                    Offset = res.CurrentIndex,
                    Total = (int)res.Total,
                }
            });
        }
 public async Task <MatchResponse> GetGlobalMatchHistoryAsync(GetGlobalHistoryRequest request)
 {
     return(await SendGrpcAction(async() => await _histotyClient.GetGlobalHistoryAsync(request, DefaultSettings.GetDefaultSettings(5))));
 }
示例#3
0
 public async Task <Result <MatchModel> > GetGlobalHistory(GetGlobalHistoryRequest request)
 {
     return(await MongoDbHelper.Query(_collection, model => true, request.Offset, request.Limt));
 }