diff --git a/icqnotify.py b/icqnotify.py index f05e663..a448cda 100755 --- a/icqnotify.py +++ b/icqnotify.py @@ -5,7 +5,7 @@ from bot.bot import Bot ICQ_TOKEN = os.environ.get("ICQ_TOKEN") ICQ_CHAT_ID = os.environ.get("ICQ_CHAT_ID") -ICQ_API_URL = os.environ.get("ICQ_API_URL", "api.icq.net") +ICQ_API_URL = os.environ.get("ICQ_API_URL", "https://api.icq.net/bot/v1") def send(message): if not ICQ_TOKEN: @@ -15,8 +15,10 @@ def send(message): if not message: raise ValueError("message is empty") - bot = Bot(token=ICQ_TOKEN) - bot.send_text(chat_id=ICQ_CHAT_ID, text=message) + print("using api base %s" % ICQ_API_URL) + bot = Bot(token=ICQ_TOKEN, api_url_base=ICQ_API_URL) + r = bot.send_text(chat_id=ICQ_CHAT_ID, text=message) + print("response was:", r) if __name__ == '__main__':