v1.3.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dingtalk"
|
||||
version = "1.3.0"
|
||||
version = "1.3.1"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "DingTalk Robot Util, Send text/markdown/link messages using DingTalk robot, 钉钉机器人"
|
||||
|
||||
@@ -109,6 +109,8 @@ WeChat Work config:
|
||||
|
||||
#### Changelog
|
||||
|
||||
* v1.3.1
|
||||
* Add `DingTalk::new_wechat`
|
||||
* v1.3.0
|
||||
* Suports WeChat Work now, add type `"type": "wechat"`, supports method `DingTalk::send_text`
|
||||
* v1.2.1
|
||||
|
||||
10
src/lib.rs
10
src/lib.rs
@@ -267,6 +267,16 @@ impl <'a> DingTalk<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create `DingTalk` for WeChat Work
|
||||
pub fn new_wechat(key: &'a str) -> Self {
|
||||
DingTalk {
|
||||
default_webhook_url: DEFAULT_WECHAT_WORK_ROBOT_URL,
|
||||
dingtalk_type: DingTalkType::WeChatWork,
|
||||
access_token: key,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// Set default webhook url
|
||||
pub fn set_default_webhook_url(&mut self, default_webhook_url: &'a str) {
|
||||
self.default_webhook_url = default_webhook_url;
|
||||
|
||||
Reference in New Issue
Block a user