reddit: add stats()
This commit is contained in:
parent
a9ae6dbb7f
commit
4ee89b85ee
2 changed files with 17 additions and 7 deletions
11
my/reddit.py
11
my/reddit.py
|
@ -222,6 +222,17 @@ def events(*args, **kwargs) -> List[Event]:
|
|||
evit = _get_events(inp, *args, **kwargs)
|
||||
return list(sorted(evit, key=lambda e: e.cmp_key))
|
||||
|
||||
|
||||
def stats():
|
||||
from .core import stat
|
||||
return {
|
||||
**stat(saved ),
|
||||
**stat(comments ),
|
||||
**stat(submissions),
|
||||
**stat(upvoted ),
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue