mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
This avoids the annoying problem where you can’t import a client unless the app has already been initialised.
26 lines
620 B
Python
26 lines
620 B
Python
from app.notify_client import NotifyAdminAPIClient
|
|
|
|
|
|
class LetterJobsClient(NotifyAdminAPIClient):
|
|
|
|
def __init__(self):
|
|
super().__init__("a" * 73, "b")
|
|
|
|
def get_letter_jobs(self):
|
|
return self.get(url='/letter-jobs')['data']
|
|
|
|
def send_letter_jobs(self, job_ids):
|
|
return self.post(
|
|
url='/send-letter-jobs',
|
|
data={"job_ids": job_ids}
|
|
)['data']
|
|
|
|
def submit_returned_letters(self, references):
|
|
return self.post(
|
|
url='/letters/returned',
|
|
data={'references': references}
|
|
)
|
|
|
|
|
|
letter_jobs_client = LetterJobsClient()
|