mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
Basic Indexer Statistics Endpoint
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user