reading messages for inbox from new most_recent endpoint

avoids us having to work out and display most recent messages
only on the front-end - it's now all done in api
This commit is contained in:
chrisw
2018-04-04 15:57:31 +01:00
parent 1d32c766e8
commit 78d16709d6
4 changed files with 44 additions and 10 deletions

View File

@@ -272,6 +272,16 @@ class ServiceAPIClient(NotifyAdminAPIClient):
}
)
def get_most_recent_inbound_sms(self, service_id, page=None):
return self.get(
'/service/{}/inbound-sms/most-recent'.format(
service_id,
),
params={
'page': page
}
)
def get_inbound_sms_by_id(self, service_id, notification_id):
return self.get(
'/service/{}/inbound-sms/{}'.format(