Skip to content

Instantly share code, notes, and snippets.

@lau-jay
Last active July 10, 2019 06:50
Show Gist options
  • Save lau-jay/7f7de579f4b87438ef3e2c8ae8ad181d to your computer and use it in GitHub Desktop.
Save lau-jay/7f7de579f4b87438ef3e2c8ae8ad181d to your computer and use it in GitHub Desktop.
class NotifierOP(Notifier):
def __init__(self):
pass
def send_message(self, message):
self.post_process(message)
def post_process(self, message):
"""
Process error.
"""
access_token = ""
send_url = DingTalk_API.format(token=access_token)
title = "New alert from wallet team"
data = {
"msgtype": "markdown",
"markdown": {
"title": title,
"text": f"#### {title} \n > {message} [href]({url})"
}
}
requests.post(
url=send_url,
headers={"Content-Type": "application/json"},
data=json.dumps(data).encode("utf-8"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment