mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 15:28:50 -04:00
Add usage to the dashboard
Takes the number of emails and SMS fragments sent from: https://github.com/alphagov/notifications-api/pull/273 Using these numbers it’s possible to show: - how much of your allowance is left - or how much you have spent For now the allowance and rates are hard coded. Only for users that have manage service.
This commit is contained in:
@@ -159,6 +159,9 @@ class ServiceAPIClient(NotificationsAPIClient):
|
||||
def get_service_history(self, service_id):
|
||||
return self.get('/service/{0}/history'.format(service_id))
|
||||
|
||||
def get_service_usage(self, service_id):
|
||||
return self.get('/service/{0}/fragment/aggregate_statistics'.format(service_id))
|
||||
|
||||
|
||||
class ServicesBrowsableItem(BrowsableItem):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user