From 9027b7da3332604dd1c7d4934f764ce1ccfecb54 Mon Sep 17 00:00:00 2001 From: Parker M Date: Tue, 19 Sep 2023 20:19:55 -0500 Subject: Add Twilio Support --- app/initialize_variables.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/initialize_variables.py') 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() -- cgit v1.2.3-70-g09d2