Пример #1
0
        public async Task <Maybe <PagedResult <Remark> > > BrowseAsync(BrowseRemarks query)
        {
            if (!_useCache)
            {
                return(await _storageClient.GetFilteredCollectionAsync <Remark, BrowseRemarks>(query, "remarks"));
            }
            var keys = await _cache.GetSortedSetAsync("remarks-latest");

            if (keys == null || !keys.Any())
            {
                return(await _storageClient.GetFilteredCollectionAsync <Remark, BrowseRemarks>(query, "remarks"));
            }
            if (!query.IsLocationProvided() || query.SkipLocation)
            {
                return(_browseRemarksFilter.Filter(await GetRemarksWithoutLocationAsync(query), query));
            }

            return(_browseRemarksFilter.Filter(await GetRemarksByLocationAsync(query), query));
        }
Пример #2
0
 public async Task <Maybe <PagedResult <ApiKey> > > BrowseAsync(BrowseApiKeys query)
 => await _storageClient.GetFilteredCollectionAsync <ApiKey, BrowseApiKeys>(query, $"api-keys");
Пример #3
0
 public async Task <Maybe <PagedResult <UserInfo> > > BrowseAsync(BrowseUsers query)
 => await _storageClient.GetFilteredCollectionAsync <UserInfo, BrowseUsers>(query, "users");
Пример #4
0
 public async Task <Maybe <PagedResult <Organization> > > BrowseAsync(BrowseOrganizations query)
 => await _storageClient.GetFilteredCollectionAsync <Organization, BrowseOrganizations>(query, $"organizations");
Пример #5
0
 public async Task <Maybe <PagedResult <Group> > > BrowseAsync(BrowseGroups query)
 => await _storageClient.GetFilteredCollectionAsync <Group, BrowseGroups>(query, "groups");
 public async Task <Maybe <PagedResult <UserStatistics> > > BrowseUserStatisticsAsync(BrowseUserStatistics query)
 => await _storageClient
 .GetFilteredCollectionAsync <UserStatistics, BrowseUserStatistics>(query, UserStatisticsEndpoint);