Files
notifications-admin/app/notify_client/upload_api_client.py
Chris Hill-Scott 2800b0a0c3 Add page to show all uploaded letters
Because we won’t be showing uploaded letters individually on the uploads
page any more we need a way of listing them. This should be by printing
day, to match how we’re grouping them on the uploads page.

This code reuses the notifications.html template, but flips the
precedence of the filename and recipient because I reckon when you’re
looking at uploads you’re thinking filename-first.
2020-05-11 14:27:43 +01:00

19 lines
410 B
Python

from app.notify_client import NotifyAdminAPIClient
class UploadApiClient(NotifyAdminAPIClient):
def get_letters_by_service_and_print_day(
self,
service_id,
*,
letter_print_day,
page=1,
):
return self.get(
url=f'/service/{service_id}/upload/uploaded-letters/{letter_print_day}?page={page}'
)
upload_api_client = UploadApiClient()