Create 'v2' get notifications route

Return multiple notifications for a service.
Choosing a page_size or a page_number is no longer allowed.
Instead, there is a `next` link included with will return the
next {default_page_size} notifications in the sequence.

Query parameters accepted are:

 - template_type: filter by specific template types
 - status: filter by specific statuses
 - older_than: return a chronological list of notifications older
   than this one. The notification with the id that is passed in
   is _not_ returned.

Note that both `template_type` and `status` can accept multiple
parameters.  Thus it is possible to call
`/v2/notifications?status=created&status=sending&status=delivered`
This commit is contained in:
Paul Craig
2016-11-23 11:44:38 +00:00
parent 1fce30aaa7
commit effbd315e0
3 changed files with 36 additions and 7 deletions

View File

@@ -468,6 +468,7 @@ class NotificationsFilterSchema(ma.Schema):
limit_days = fields.Int(required=False)
include_jobs = fields.Boolean(required=False)
include_from_test_key = fields.Boolean(required=False)
older_than = fields.UUID(required=False)
@pre_load
def handle_multidict(self, in_data):