Exemplo n.º 1
0
        public async Task <PagedList <TorrentView> > ListAsync(TorrentFilter filter)
        {
            var url = $"{_apiOptions.Torrents}?{filter?.ToQueryString()}";

            return(await _httpClientService.GetJsonAsync <PagedList <TorrentView> >(url));
        }
Exemplo n.º 2
0
        public async Task <IPagedList <TorrentView> > Get([FromQuery] TorrentFilter filter)
        {
            var pagedList = await _torrentService.ListAsync(filter);

            return(PagedList.From(pagedList, torrents => _mapper.Map <IEnumerable <TorrentView> >(torrents)));
        }