dingtalk
DingTalk Robot Util, Send text/markdown/link messages using DingTalk robot
钉钉机器人 Rust SDK
NOTE: From version 1.1.0 dingtalk uses reqwest 0.10.0's async/.await API.
Official reference: https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/0fa88adc
Sample 1:
use DingTalk;
pub async
Need use crate: tokio = { version = "0.2.6", features = ["full"] }.
Sample 2 (Read token from file):
pub async
Sample, send markdown message:
dt.send_markdown.await?;
Sample, send link message:
dt.send_link.await?;
Sample, send feed card message:
dt.send_message.await?;
Sample, send action card message(single btn):
dt.send_message.await?;
Sample, send action card message(multi btns):
dt.send_message.await?;
JSON Config
DingTalk config:
WeChat Work config:
Changelog
- v2.0.0
- Remove
'alife cycle
- Remove
- v1.3.2
- Add
DingTalk::from_token
- Add
- v1.3.1
- Add
DingTalk::new_wechat
- Add
- v1.3.0
- Suports WeChat Work now, add type
"type": "wechat", supports methodDingTalk::send_text
- Suports WeChat Work now, add type
- v1.2.1
- Remove
maplitcrate
- Remove
- v1.2.0
- Use
serdeandserde_jsoncrates, replacejsoncrate
- Use
- v1.1.2
- Use
hmacandsha2crates, replacerust-cryptocrate
- Use
- v1.1.1
DingTalk::from_jsonadddirect_url- Fix problems by clippy
- v1.1.0
- Change fn to async/.await
- v1.0.1
- Change two fn names
- Add readme sample codes
- v1.0.0
TEXT->Text..., change enum caps- Add
ActionCardmessage, send action card message type - Add
direct_urlforDingTalk, for outgoing robot - Implemented almost the functions listed on https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/0fa88adc
- v0.3.0
- Add
FeedCardmessage, send feed card message type
- Add
- v0.2.1
- Add
Dingtalk::from_json, read token from JSON string
- Add
- v0.2.0
- Add
DingTalk::from_file, read token from file
- Add
- v0.1.2
- Add
Default::default()support
- Add
- v0.1.1
- Add
set_default_webhook_url, default dingtalk webhook url
- Add
- v0.1.0
- Add
DingTalk::send_link(...), send link message
- Add
- v0.0.3
- Add
DingTalkMessage, can setat_all,at_mobilesnow
- Add