collection stats - whole collection (#169)
* Add endpoint to retrieve collection stats report * Create separate test for statistics * Add test for collectionStats * Fixed typo * Change endpoint name to use a verb * Change name to getCollectionStatsHTML * Allow stats for whole collection * Allow stats for whole collection
This commit is contained in:
parent
ad0e41d950
commit
2ca35712f3
@ -377,7 +377,10 @@ guarantee that your application continues to function properly in the future.
|
||||
```json
|
||||
{
|
||||
"action": "getCollectionStatsHTML",
|
||||
"version": 6
|
||||
"version": 6,
|
||||
"params": {
|
||||
"wholeCollection": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -299,8 +299,10 @@ class AnkiConnect:
|
||||
|
||||
|
||||
@util.api()
|
||||
def getCollectionStatsHTML(self):
|
||||
return self.collection().stats().report()
|
||||
def getCollectionStatsHTML(self, wholeCollection=True):
|
||||
stats = self.collection().stats()
|
||||
stats.wholeCollection = wholeCollection
|
||||
return stats.report()
|
||||
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user