Skip to content

Commit

Permalink
Merge pull request #10 from wslongchen/develop
Browse files Browse the repository at this point in the history
增加相关功能点:增加企微对应服务的应用
  • Loading branch information
wslongchen authored Sep 13, 2022
2 parents 9b52db6 + a2d56d7 commit cfbfcd0
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "labrador"
version = "0.1.11"
version = "0.1.12"
authors = ["mrpan <1049058427@qq.com>"]
edition = "2018"
description = "Labrador - Mini thirdpart client for rust."
Expand Down
45 changes: 45 additions & 0 deletions src/wechat/cp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,49 @@ impl<T: SessionStore> WechatCpClient<T> {
WechatCpMedia::new(self)
}

/// 自建应用
pub fn agent(&self) -> WechatCpAgent<T> {
WechatCpAgent::new(self)
}

/// 部门
pub fn department(&self) -> WechatCpDepartment<T> {
WechatCpDepartment::new(self)
}

/// 外部联系人
pub fn external_contact(&self) -> WechatCpExternalContact<T> {
WechatCpExternalContact::new(self)
}

/// 群机器人
pub fn group_robot(&self) -> WechatCpGroupRobot<T> {
WechatCpGroupRobot::new(self)
}

/// 菜单
pub fn menu(&self) -> WechatCpMenu<T> {
WechatCpMenu::new(self)
}

/// 消息
pub fn message(&self) -> WechatCpMessage<T> {
WechatCpMessage::new(self)
}

/// 认证
pub fn oauth2(&self) -> WechatCpOauth2<T> {
WechatCpOauth2::new(self)
}

/// 标签
pub fn tag(&self) -> WechatCpTag<T> {
WechatCpTag::new(self)
}

/// 用户
pub fn user(&self) -> WechatCpUser<T> {
WechatCpUser::new(self)
}

}
30 changes: 30 additions & 0 deletions src/wechat/cp/tp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,36 @@ impl<T: SessionStore> WechatCpTpClient<T> {
}
self.client.get(method, params, request_type).await
}

/// 部门
pub fn department(&self) -> WechatCpTpDepartment<T> {
WechatCpTpDepartment::new(self)
}

/// 接口调用许可
pub fn license(&self) -> WechatCpTpLicense<T> {
WechatCpTpLicense::new(self)
}

/// 媒体
pub fn media(&self) -> WechatCpTpMedia<T> {
WechatCpTpMedia::new(self)
}

/// 订单
pub fn order(&self) -> WechatCpTpOrder<T> {
WechatCpTpOrder::new(self)
}

/// 标签
pub fn tag(&self) -> WechatCpTpTag<T> {
WechatCpTpTag::new(self)
}

/// 用户
pub fn user(&self) -> WechatCpTpUser<T> {
WechatCpTpUser::new(self)
}
}

//----------------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit cfbfcd0

Please sign in to comment.