aboutsummaryrefslogtreecommitdiff
path: root/app/initialize_variables.py
diff options
context:
space:
mode:
authorParker M <contact@pkrm.dev>2023-09-19 20:19:55 -0500
committerParker M <contact@pkrm.dev>2023-09-19 20:19:55 -0500
commit9027b7da3332604dd1c7d4934f764ce1ccfecb54 (patch)
tree4798770968bfa157e99d080d7254a43dcc9c1f01 /app/initialize_variables.py
parentffea8cc42abb9882d18fbab87e097264ff014c02 (diff)
Add Twilio Support
Diffstat (limited to 'app/initialize_variables.py')
-rw-r--r--app/initialize_variables.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/initialize_variables.py b/app/initialize_variables.py
index 33e2642..5450036 100644
--- a/app/initialize_variables.py
+++ b/app/initialize_variables.py
@@ -2,7 +2,7 @@ import os
import yaml
import requests
-supported_sms_services = ['telnyx']
+supported_sms_services = ['telnyx', 'twilio']
sms_service = str(os.environ['SMS_SERVICE']).lower()
radarr_host_url = str(os.environ['RADARR_HOST_URL'])
@@ -33,6 +33,10 @@ try:
if sms_service == 'telnyx':
telnyx_api_key = str(file['telnyx_api_key'])
+ if sms_service == 'twilio':
+ twilio_account_sid = str(file['twilio_account_sid'])
+ twilio_auth_token = str(file['twilio_auth_token'])
+
value_not_set = False
except:
print('One or more values are not set or not set correctly within the config.yaml file. Please edit the file or refer to the docs for more information.')
@@ -64,6 +68,10 @@ if value_not_set:
if sms_service == 'telnyx':
f.write("telnyx_api_key:\n")
+ if sms_service == 'twilio':
+ f.write("twilio_account_sid:\n")
+ f.write("twilio_auth_token:\n")
+
f.write("\n\n# INFORMATION: There should be NO trailing spaced after you enter a value,\n# this will cause errors.\n# There should be one space after the colon though (e.g. quality_profile_id: 1)\n# Check docs for information on each value.")
exit()