mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-02 07:00:51 -04:00
Add a page to show delivery rates week-by-week
Implements https://github.com/alphagov/notifications-api/pull/286 Will always show weeks as Monday to Sunday.
This commit is contained in:
@@ -20,3 +20,14 @@ class StatisticsApiClient(BaseAPIClient):
|
||||
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:
|
||||
params['date_from'] = date_from
|
||||
if week_count is not None:
|
||||
params['week_count'] = week_count
|
||||
return self.get(
|
||||
url='/service/{}/notifications-statistics/seven_day_aggregate'.format(service_id),
|
||||
params=params
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user