qbit_manage/modules/apprise.py
2021-12-28 12:19:58 -05:00

13 lines
456 B
Python

import logging
from modules.util import Failed
logger = logging.getLogger("qBit Manage")
class Apprise:
def __init__(self, config, params):
self.config = config
self.api_url = params["api_url"]
self.notify_url = ",".join(params["notify_url"])
response = self.config.get(self.api_url)
if response.status_code != 200:
raise Failed(f"Apprise Error: Unable to connect to Apprise using {self.api_url}")