Basic Indexer Statistics Endpoint

This commit is contained in:
Qstick
2020-11-16 13:12:20 -05:00
parent fef81171ba
commit 5b22093c29
18 changed files with 159 additions and 39 deletions
@@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.Linq;
namespace NzbDrone.Core.IndexerStats
{
public interface IIndexerStatisticsService
{
List<IndexerStatistics> IndexerStatistics();
}
public class IndexerStatisticsService : IIndexerStatisticsService
{
private readonly IIndexerStatisticsRepository _indexerStatisticsRepository;
public IndexerStatisticsService(IIndexerStatisticsRepository indexerStatisticsRepository)
{
_indexerStatisticsRepository = indexerStatisticsRepository;
}
public List<IndexerStatistics> IndexerStatistics()
{
var seasonStatistics = _indexerStatisticsRepository.IndexerStatistics();
return seasonStatistics.ToList();
}
}
}