caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
11.71k stars 410 forks source link

Added WeCom Bot Support #1016

Closed caronc closed 9 months ago

caronc commented 9 months ago

Description:

Related issue (if applicable): #917

Added WeCom Bot Support:\

Account Setup

Sign up for WeChat from here. You will be provided to create a user and password to associate with your account. This is all you need to use this through Apprise.

WeCom for PC

  1. On WeCom for PC, find the target WeCom group for receiving alarm notifications.
  2. Right-click the WeCom group. In the window that appears, click "Add Group Bot".
  3. In the window that appears, click Create a Bot.
  4. In the window that appears, enter a custom bot name and click Add.
  5. You will be provided a Webhook URL that looks like:
    • https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=abcd

WeCom for Web

  1. On WebCom for Web, open the target WeCom group for receiving alarm notifications.
  2. Click the group settings icon in the upper-right corner.
  3. On the group settings page, choose Group Bots > Add a Bot.
  4. On the management page for adding bots, enter a custom name for the new bot.
  5. Click Add
  6. You will be provided a Webhook URL that looks like:
    • https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=abcd

Syntax

Valid syntax is as follows:

Parameter Breakdown

Variable Required Description
key No Can optionally use the ?key instead of passing the key in the hostname field. This has more value when defining configuration files.

New Service Completion Status

Checklist

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@917-wecom-support

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "wecombot://botkey'
codecov-commenter commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a8e24ea) 99.52% compared to head (20092ae) 99.52%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1016 +/- ## ======================================= Coverage 99.52% 99.52% ======================================= Files 128 129 +1 Lines 17126 17189 +63 Branches 3502 3510 +8 ======================================= + Hits 17044 17107 +63 Misses 70 70 Partials 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.