代码拉取完成,页面将自动刷新
企业微信、钉钉、WeLink机器人对接SDK
注:WeLink只支持文本消息
var robot = new RobotService();
//WeLink
robot.Send("https://open.welink.huaweicloud.com/api/werobot/v1/webhook/send?token=*******&channel=standard", new WeLinkMessageAgrs {
content = new WeLinkMessageAgrs.Content { text = "测试消息" },
timeStamp = DateTime.Now.ToLong(),
uuid = Guid.NewGuid().ToString("N"),
isAt = false,
IsAtAll = true,
});
//企业微信
robot.Send("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=*******", new WeiXinMessageAgrs
{
msgtype = "text",
text = new WeiXinMessageAgrs.Text
{
content = "测试消息",
mentioned_list = new List<string> { "@all" },
}
});
//钉钉
robot.Send("https://oapi.dingtalk.com/robot/send?access_token=*******", new DingTalkMessageAgrs
{
msgtype = "text",
text = new DingTalkMessageAgrs.Text
{
content = "测试消息",
},
at = new DingTalkMessageAgrs.At { isAtAll = true }
});
欢迎贡献代码、报告问题和提供建议!请在 Gitee/GitHub 项目中提交 Issue 或 Pull Request。
本项目基于 MIT 许可进行分发和使用。详细信息请查阅 LICENSE 文件。
作者:荣少
邮箱:ligengrong@hotmail.com
QQ群:7405133
你的赞赏就是我前进的动力🏃,
如果EOH.Robot给你带来了不少便利,
那就请作者喝杯咖啡☕吧。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。