User Agent Stats

This commit is contained in:
Qstick
2021-02-20 00:47:49 -05:00
parent 2f702ba06d
commit 0b45929ccc
10 changed files with 156 additions and 78 deletions

View File

@@ -16,12 +16,21 @@ namespace Prowlarr.Api.V1.Indexers
{
_indexerStatisticsService = indexerStatisticsService;
GetResourceAll = GetAll;
Get("/", x =>
{
return GetAll();
});
}
private List<IndexerStatsResource> GetAll()
private IndexerStatsResource GetAll()
{
return _indexerStatisticsService.IndexerStatistics().ToResource();
var indexerResource = new IndexerStatsResource
{
Indexers = _indexerStatisticsService.IndexerStatistics(),
UserAgents = _indexerStatisticsService.UserAgentStatistics(),
};
return indexerResource;
}
}
}