mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-17 13:09:49 -04:00
Limit big numbers to the last 7 days
Implements and depends on: - https://github.com/alphagov/notifications-api/pull/241
This commit is contained in:
@@ -12,7 +12,10 @@ 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):
|
||||
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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user