mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 23:13:12 -04:00
Modify notifications_python_client
This changeset modifies the notifications_python_client we pulled in to no longer reference the UK Notify system. Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -3,6 +3,8 @@ import logging
|
|||||||
import time
|
import time
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
|
from os import getenv
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from notifications_python_client import __version__
|
from notifications_python_client import __version__
|
||||||
@@ -11,6 +13,8 @@ from notifications_python_client.errors import HTTPError, InvalidResponse
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
API_PUBLIC_URL = getenv("API_PUBLIC_URL", "localhost")
|
||||||
|
|
||||||
|
|
||||||
class BaseAPIClient:
|
class BaseAPIClient:
|
||||||
"""
|
"""
|
||||||
@@ -20,7 +24,7 @@ class BaseAPIClient:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, api_key, base_url="https://api.notifications.service.gov.uk", timeout=30
|
self, api_key, base_url=API_PUBLIC_URL, timeout=30
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Initialise the client
|
Initialise the client
|
||||||
|
|||||||
Reference in New Issue
Block a user