using NzbDrone.Core.Datastore; using NzbDrone.Core.History; namespace NzbDrone.Api.History { public class HistoryModule : NzbDroneRestModule { private readonly IHistoryService _historyService; public HistoryModule(IHistoryService historyService) { _historyService = historyService; GetResourcePaged = GetHistory; } private PagingResource GetHistory(PagingResource pagingResource) { var pagingSpec = new PagingSpec { Page = pagingResource.Page, PageSize = pagingResource.PageSize, SortKey = pagingResource.SortKey, SortDirection = pagingResource.SortDirection }; return ApplyToPage(_historyService.Paged, pagingSpec); } } }