Add a document download client

Allows uploading documents to the Document Download API.
The client is configured with an API host and auth token. There's
no need for a flag to disable the client in the test environments
at the moment since the upload is only triggered by a specific
payload which would only be sent with an explicit goal of using
document download.
This commit is contained in:
Alexey Bezhan
2018-04-04 17:31:02 +01:00
parent a0c6f6a22e
commit 204aaf172d
4 changed files with 70 additions and 0 deletions

View File

@@ -318,6 +318,9 @@ class Config(object):
TEMPLATE_PREVIEW_API_HOST = os.environ.get('TEMPLATE_PREVIEW_API_HOST', 'http://localhost:6013')
TEMPLATE_PREVIEW_API_KEY = os.environ.get('TEMPLATE_PREVIEW_API_KEY', 'my-secret-key')
DOCUMENT_DOWNLOAD_API_HOST = os.environ.get('DOCUMENT_DOWNLOAD_API_HOST', 'http://localhost:7000')
DOCUMENT_DOWNLOAD_API_KEY = os.environ.get('DOCUMENT_DOWNLOAD_API_KEY', 'auth-token')
LETTER_PROCESSING_DEADLINE = time(17, 30)
MMG_URL = "https://api.mmg.co.uk/json/api.php"