pub struct MessageApi { /* private fields */ }Expand description
消息 API 门面
Implementations§
Source§impl MessageApi
impl MessageApi
Sourcepub fn new(client: MpClient) -> MessageApi
pub fn new(client: MpClient) -> MessageApi
基于客户端创建
Sourcepub async fn send_subscribe(
&self,
req: &SendSubscribeMessageRequest,
) -> Result<SubscribeMessageResponse, MpError>
pub async fn send_subscribe( &self, req: &SendSubscribeMessageRequest, ) -> Result<SubscribeMessageResponse, MpError>
发送订阅消息
Sourcepub async fn get_template_list(&self) -> Result<TemplateListResponse, MpError>
pub async fn get_template_list(&self) -> Result<TemplateListResponse, MpError>
获取已添加的模板列表
Sourcepub async fn add_template(
&self,
req: &AddTemplateRequest,
) -> Result<String, MpError>
pub async fn add_template( &self, req: &AddTemplateRequest, ) -> Result<String, MpError>
选用模板
Sourcepub async fn send_customer_message(
&self,
req: &CustomerMessageRequest,
) -> Result<(), MpError>
pub async fn send_customer_message( &self, req: &CustomerMessageRequest, ) -> Result<(), MpError>
发送客服消息
Trait Implementations§
Source§impl Clone for MessageApi
impl Clone for MessageApi
Source§fn clone(&self) -> MessageApi
fn clone(&self) -> MessageApi
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MessageApi
impl !UnwindSafe for MessageApi
impl Freeze for MessageApi
impl Send for MessageApi
impl Sync for MessageApi
impl Unpin for MessageApi
impl UnsafeUnpin for MessageApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more