changing watchers and adding subscribers
This commit is contained in:
Родитель
d198a102f4
Коммит
a6a9ac92cc
|
@ -114,7 +114,19 @@ class Github:
|
|||
int: Number of watchers.
|
||||
"""
|
||||
return (
|
||||
self.general_stats["stargazers_count"]
|
||||
self.general_stats["watchers_count"]
|
||||
if self.general_stats is not None
|
||||
else None
|
||||
)
|
||||
|
||||
@property
|
||||
def subscribers(self):
|
||||
"""Get current number of subscribers.
|
||||
Returns:
|
||||
int: Number of watchers.
|
||||
"""
|
||||
return (
|
||||
self.general_stats["subscribers_count"]
|
||||
if self.general_stats is not None
|
||||
else None
|
||||
)
|
||||
|
|
|
@ -11,7 +11,6 @@ sys.path.append(os.getcwd())
|
|||
import argparse
|
||||
import traceback
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from dateutil.parser import isoparse
|
||||
from pymongo import MongoClient
|
||||
from datetime import datetime
|
||||
|
@ -99,6 +98,7 @@ def github_stats_as_dict(github):
|
|||
"stars": github.stars,
|
||||
"forks": github.forks,
|
||||
"watchers": github.watchers,
|
||||
"subscribers": github.subscribers,
|
||||
"open_issues": github.open_issues,
|
||||
"open_pull_requests": github.open_pull_requests,
|
||||
"unique_views": github.number_unique_views,
|
||||
|
|
Загрузка…
Ссылка в новой задаче