mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2024-11-10 17:47:13 +08:00
13 lines
456 B
Python
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}")
|