mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
Making the new pinpoint client.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Protocol
|
||||
|
||||
from botocore.config import Config
|
||||
|
||||
AWS_CLIENT_CONFIG = Config(
|
||||
@@ -22,7 +24,7 @@ class ClientException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class Client(object):
|
||||
class Client(Protocol):
|
||||
"""
|
||||
Base client for sending notifications.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from abc import abstractmethod, abstractproperty
|
||||
|
||||
from app.clients import Client, ClientException
|
||||
|
||||
|
||||
@@ -27,9 +29,10 @@ class EmailClient(Client):
|
||||
Base Email client for sending emails.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def send_email(self, *args, **kwargs):
|
||||
raise NotImplementedError("TODO Need to implement.")
|
||||
|
||||
@property
|
||||
@abstractproperty
|
||||
def name(self):
|
||||
raise NotImplementedError("TODO Need to implement.")
|
||||
|
||||
0
app/clients/pinpoint/__init__.py
Normal file
0
app/clients/pinpoint/__init__.py
Normal file
@@ -1,3 +1,5 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
from app.clients import Client, ClientException
|
||||
|
||||
|
||||
@@ -18,11 +20,14 @@ class SmsClient(Client):
|
||||
Base Sms client for sending smss.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def init_app(self, *args, **kwargs):
|
||||
raise NotImplementedError("TODO Need to implement.")
|
||||
|
||||
@abstractmethod
|
||||
def send_sms(self, *args, **kwargs):
|
||||
raise NotImplementedError("TODO Need to implement.")
|
||||
|
||||
@abstractmethod
|
||||
def get_name(self):
|
||||
raise NotImplementedError("TODO Need to implement.")
|
||||
|
||||
Reference in New Issue
Block a user