mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 05:31:44 -04:00
Refactor to add separate letter branding client
We were getting all letter logos from a method in the email branding client. Since we will be adding more client methods to deal with letters, it makes things clearer to separate the email and letter branding clients.
This commit is contained in:
@@ -23,9 +23,6 @@ class EmailBrandingClient(NotifyAdminAPIClient):
|
||||
return branding['id']
|
||||
return None
|
||||
|
||||
def get_letter_email_branding(self):
|
||||
return self.get(url='/dvla_organisations')
|
||||
|
||||
@cache.delete('email_branding')
|
||||
def create_email_branding(self, logo, name, text, colour, domain, brand_type):
|
||||
data = {
|
||||
|
||||
13
app/notify_client/letter_branding_client.py
Normal file
13
app/notify_client/letter_branding_client.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from app.notify_client import NotifyAdminAPIClient
|
||||
|
||||
|
||||
class LetterBrandingClient(NotifyAdminAPIClient):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("a" * 73, "b")
|
||||
|
||||
def get_letter_branding(self):
|
||||
return self.get(url='/dvla_organisations')
|
||||
|
||||
|
||||
letter_branding_client = LetterBrandingClient()
|
||||
Reference in New Issue
Block a user