Add PlatformStatsAPIClient

In API, the endpoint for the new platform admin stats page has been
moved to a platform stats blueprint. This means we now need a platform
stats client.
This commit is contained in:
Katie Smith
2018-06-28 10:28:57 +01:00
parent d9aeac4dca
commit ca16bef7f7
7 changed files with 34 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
from app.notify_client import NotifyAdminAPIClient
class PlatformStatsAPIClient(NotifyAdminAPIClient):
# Fudge assert in the super __init__ so
# we can set those variables later.
def __init__(self):
super().__init__("a" * 73, "b")
def get_aggregate_platform_stats(self, params_dict=None):
return self.get("/platform-stats", params=params_dict)

View File

@@ -409,9 +409,6 @@ class ServiceAPIClient(NotifyAdminAPIClient):
def get_aggregate_platform_stats(self, params_dict=None):
return self.get("/service/platform-stats", params=params_dict)
def get_new_aggregate_platform_stats(self, params_dict=None):
return self.get("/service/platform-stats-new", params=params_dict)
def get_sms_senders(self, service_id):
return self.get(
"/service/{}/sms-sender".format(service_id)