mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-07 23:10:41 -04:00
Merge branch 'master' into remove-stats-from-send
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from notifications_python_client.base import BaseAPIClient
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
class StatisticsApiClient(BaseAPIClient):
|
||||
@@ -13,15 +12,6 @@ class StatisticsApiClient(BaseAPIClient):
|
||||
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
|
||||
self.secret = app.config['ADMIN_CLIENT_SECRET']
|
||||
|
||||
def get_statistics_for_service(self, service_id, limit_days=None):
|
||||
params = {}
|
||||
if limit_days is not None:
|
||||
params['limit_days'] = limit_days
|
||||
return self.get(
|
||||
url='/service/{}/notifications-statistics'.format(service_id),
|
||||
params=params
|
||||
)
|
||||
|
||||
def get_7_day_aggregate_for_service(self, service_id, date_from=None, week_count=None):
|
||||
params = {}
|
||||
if date_from is not None:
|
||||
|
||||
Reference in New Issue
Block a user