Client

Struct Client 

Source
pub struct Client { /* private fields */ }

Implementations§

Source§

impl Client

Source

pub fn new( corp_id: String, corp_secret: String, custom_contact_secret: Option<String>, ) -> Client

Source

pub fn new_from_env() -> Result<Self>

Trait Implementations§

Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DepartmentManager for Client

Source§

fn department_create<'life0, 'async_trait>( &'life0 self, params: ParamsCreateDepartment, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90205

Source§

fn department_update<'life0, 'async_trait>( &'life0 self, params: ParamsUpdateDepartment, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90206

Source§

fn department_delete<'life0, 'async_trait>( &'life0 self, id: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90207

Source§

fn department_list<'life0, 'async_trait>( &'life0 self, id: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<DepartmentList<Vec<Department>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90208

Source§

fn department_sample_list<'life0, 'async_trait>( &'life0 self, id: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<DepartmentSimpleList>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/95350

Source§

fn department_get<'life0, 'async_trait>( &'life0 self, id: u64, ) -> Pin<Box<dyn Future<Output = Result<DepartmentList<Department>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/95351

Source§

impl EnterpriseServiceManager for Client

Source§

fn get_follow_user_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取配置了客户联系功能的成员列表 https://developer.work.weixin.qq.com/document/path/92571
Source§

fn contact_way_create<'life0, 'async_trait>( &'life0 self, params: ParamsContactWayCreate, ) -> Pin<Box<dyn Future<Output = Result<RespContactWayCreate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

配置客户联系「联系我」方式
Source§

fn contact_way_get<'life0, 'life1, 'async_trait>( &'life0 self, config_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ContactWay>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取企业已配置的「联系我」方式
Source§

fn contact_way_list<'life0, 'async_trait>( &'life0 self, params: Option<ParamsContactWayList>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ContactWay>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取企业已配置的「联系我」列表
Source§

fn contact_way_update<'life0, 'async_trait>( &'life0 self, params: ParamsContactWayUpdate, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

更新企业已配置的「联系我」方式
Source§

fn contact_way_delete<'life0, 'life1, 'async_trait>( &'life0 self, config_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

删除企业已配置的「联系我」方式
Source§

fn temp_chat_close<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, userid: &'life1 str, external_userid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

结束临时会话
Source§

impl LeaveJobInheritManager for Client

Source§

fn unassigned_list<'life0, 'async_trait>( &'life0 self, params: ParamsUnassignedList, ) -> Pin<Box<dyn Future<Output = Result<ResponseUnassignedList>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取待分配的离职成员列表 https://developer.work.weixin.qq.com/document/path/92273
Source§

fn leave_job_transfer_customer<'life0, 'async_trait>( &'life0 self, params: ParamsTransferCustomer, ) -> Pin<Box<dyn Future<Output = Result<Customer<Vec<TransferCustomer>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

分配离职成员的客户 https://developer.work.weixin.qq.com/document/path/94100
Source§

fn transfer_result_get<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, handover_userid: &'life1 str, takeover_userid: &'life2 str, cursor: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Customer<Vec<TransferResult>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

查询客户接替状态 https://developer.work.weixin.qq.com/document/path/94101 @param: handover_userid 原添加成员的userid takeover_userid 接替成员的userid cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页
Source§

fn groupchat_transfer<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chat_id_list: &'life1 [&'life2 str], new_owner: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<FailedChat>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

分配离职成员的客户群 https://developer.work.weixin.qq.com/document/path/93242 注意: 群主离职了的客户群,才可继承 继承给的新群主,必须是配置了客户联系功能的成员 继承给的新群主,必须有设置实名 继承给的新群主,必须有激活企业微信 同一个人的群,限制每天最多分配300个给新群主 @params chat_id_list: 需要转群主的客户群ID列表。取值范围: 1 ~ 100 new_owner: 新群主ID
Source§

impl OnJobInheritManager for Client

Source§

fn transfer_customer<'life0, 'async_trait>( &'life0 self, params: ParamsTransferCustomer, ) -> Pin<Box<dyn Future<Output = Result<Vec<ResponeTransferCustomer>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

分配在职成员的客户 https://developer.work.weixin.qq.com/document/path/92125
Source§

fn transfer_result<'life0, 'async_trait>( &'life0 self, params: ParamsTransferResult, ) -> Pin<Box<dyn Future<Output = Result<ResponeTransferResultList>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

查询客户接替状态 https://developer.work.weixin.qq.com/document/path/94088
Source§

fn transfer_onjob_groupchat<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chat_id_list: &'life1 [&'life2 str], new_owner: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<FailedChat>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

分配在职成员的客户群 企业可通过此接口,将在职成员为群主的群,分配给另一个客服成员 https://developer.work.weixin.qq.com/document/path/95703 chat_id_list 需要转群主的客户群ID列表。取值范围: 1 ~ 100 new_owner 新群主ID
Source§

impl TagManager for Client

Source§

fn tag_create<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, id: Option<i64>, ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

创建标签 https://developer.work.weixin.qq.com/document/path/90210
Source§

fn tag_update<'life0, 'life1, 'async_trait>( &'life0 self, id: i64, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新标签名称 https://developer.work.weixin.qq.com/document/path/90211
Source§

fn tag_delete<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

删除标签 https://developer.work.weixin.qq.com/document/path/90212
Source§

fn tag_user_get<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<TagUser>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取标签成员 https://developer.work.weixin.qq.com/document/path/90213
Source§

fn tag_user_add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: i64, user_list: Option<&'life1 [&'life2 str]>, party_list: Option<&'life3 [i64]>, ) -> Pin<Box<dyn Future<Output = Result<ResponseTagUser>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

增加标签成员 https://developer.work.weixin.qq.com/document/path/90214 @params user_list: 企业成员ID列表,注意:user_list、party)list不能同时为空,单次请求个数不超过1000 party_list: 企业部门ID列表,注意:user_list、party_list不能同时为空,单次请求个数不超过100
Source§

fn tag_user_delete<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: i64, user_list: Option<&'life1 [&'life2 str]>, party_list: Option<&'life3 [i64]>, ) -> Pin<Box<dyn Future<Output = Result<ResponseTagUser>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

删除标签成员 https://developer.work.weixin.qq.com/document/path/90215 @params user_list: 企业成员ID列表,注意:user_list、party)list不能同时为空,单次请求个数不超过1000 party_list: 企业部门ID列表,注意:user_list、party_list不能同时为空,单次请求个数不超过100
Source§

fn tag_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Tag>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取标签列表 https://developer.work.weixin.qq.com/document/path/90216
Source§

impl UserManager for Client

Source§

fn user_create<'life0, 'async_trait>( &'life0 self, params: ParamsCreateUser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

API参考:https://developer.work.weixin.qq.com/document/path/90195

Source§

fn user_get<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

API参考:https://developer.work.weixin.qq.com/document/path/90196

Source§

fn user_delete<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90198

Source§

fn user_batch_delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, userids: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90199

Source§

fn user_list<'life0, 'async_trait>( &'life0 self, department_id: u64, ) -> Pin<Box<dyn Future<Output = Result<UserList>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

https://developer.work.weixin.qq.com/document/path/90201

Source§

fn userid_get<'life0, 'life1, 'async_trait>( &'life0 self, mobile: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

https://developer.work.weixin.qq.com/document/path/95402

Source§

fn user_update<'life0, 'async_trait>( &'life0 self, params: ParamsUpdateUser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

更新成员

Auto Trait Implementations§

§

impl Freeze for Client

§

impl RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,