2018-06-06 15:22:48 +01:00
|
|
|
from app.notify_client import NotifyAdminAPIClient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ComplaintApiClient(NotifyAdminAPIClient):
|
|
|
|
|
# Fudge assert in the super __init__ so
|
|
|
|
|
# we can set those variables later.
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__("a" * 73, "b")
|
|
|
|
|
|
2018-07-03 10:54:33 +01:00
|
|
|
def get_all_complaints(self, page=1):
|
|
|
|
|
params = {'page': page}
|
|
|
|
|
return self.get('/complaint', params=params)
|
2018-06-21 15:04:03 +01:00
|
|
|
|
|
|
|
|
def get_complaint_count(self, params_dict=None):
|
|
|
|
|
return self.get('/complaint/count-by-date-range', params=params_dict)
|
2018-10-26 15:39:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
complaint_api_client = ComplaintApiClient()
|