GeweHttpClient

Struct GeweHttpClient 

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

Implementations§

Source§

impl GeweHttpClient

Source

pub fn new( token: impl Into<String>, base_url: impl Into<String>, ) -> Result<Self, GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source

pub async fn admin_operate( &self, req: AdminOperateRequest<'_>, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source

pub async fn download_image( &self, app_id: &str, xml: &str, image_type: i32, ) -> Result<DownloadImageResponse, GeweError>

Source

pub async fn download_video( &self, app_id: &str, xml: &str, ) -> Result<DownloadVideoResponse, GeweError>

Source

pub async fn download_file( &self, app_id: &str, xml: &str, ) -> Result<DownloadFileResponse, GeweError>

Source

pub async fn download_voice( &self, app_id: &str, xml: &str, msg_id: i64, ) -> Result<DownloadVoiceResponse, GeweError>

Source

pub async fn download_emoji( &self, app_id: &str, emoji_md5: &str, ) -> Result<DownloadEmojiResponse, GeweError>

Source

pub async fn download_cdn( &self, app_id: &str, aes_key: &str, file_id: &str, file_type: &str, total_size: &str, suffix: &str, ) -> Result<DownloadCdnResponse, GeweError>

Source§

impl GeweHttpClient

Source

pub async fn forward_image( &self, app_id: &str, to_wxid: &str, xml: &str, ) -> Result<ForwardImageResponse, GeweError>

Source

pub async fn forward_video( &self, app_id: &str, to_wxid: &str, xml: &str, ) -> Result<ForwardVideoResponse, GeweError>

Source

pub async fn forward_file( &self, app_id: &str, to_wxid: &str, xml: &str, ) -> Result<ForwardFileResponse, GeweError>

Source

pub async fn forward_mini_app( &self, app_id: &str, to_wxid: &str, xml: &str, cover_img_url: &str, ) -> Result<ForwardMiniAppResponse, GeweError>

Source

pub async fn forward_url( &self, app_id: &str, to_wxid: &str, xml: &str, ) -> Result<ForwardUrlResponse, GeweError>

Source§

impl GeweHttpClient

Source

pub async fn revoke_message( &self, app_id: &str, to_wxid: &str, msg_id: &str, new_msg_id: &str, create_time: &str, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source

pub async fn send_text( &self, app_id: &str, to_wxid: &str, content: &str, ats: Option<&str>, ) -> Result<SendTextResponse, GeweError>

Source

pub async fn send_image( &self, app_id: &str, to_wxid: &str, img_url: &str, ) -> Result<PostImageResponse, GeweError>

Source

pub async fn send_voice( &self, app_id: &str, to_wxid: &str, voice_url: &str, voice_duration: i64, ) -> Result<PostVoiceResponse, GeweError>

Source

pub async fn send_video( &self, app_id: &str, to_wxid: &str, video_url: &str, thumb_url: &str, video_duration: i64, ) -> Result<PostVideoResponse, GeweError>

Source

pub async fn send_file( &self, app_id: &str, to_wxid: &str, file_url: &str, file_name: &str, ) -> Result<PostFileResponse, GeweError>

Source

pub async fn send_emoji( &self, app_id: &str, to_wxid: &str, emoji_md5: &str, emoji_size: i64, ) -> Result<PostEmojiResponse, GeweError>

Source

pub async fn send_app_msg( &self, app_id: &str, to_wxid: &str, appmsg: &str, ) -> Result<PostAppMsgResponse, GeweError>

Source

pub async fn send_mini_app( &self, app_id: &str, to_wxid: &str, mini_app_id: &str, display_name: &str, page_path: &str, cover_img_url: &str, title: &str, user_name: &str, ) -> Result<PostMiniAppResponse, GeweError>

Source

pub async fn send_name_card( &self, app_id: &str, to_wxid: &str, nick_name: &str, name_card_wxid: &str, ) -> Result<PostNameCardResponse, GeweError>

Source§

impl GeweHttpClient

Source

pub async fn like_sns(&self, req: LikeSnsRequest<'_>) -> Result<(), GeweError>

Source

pub async fn comment_sns( &self, req: CommentSnsRequest<'_>, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source

pub async fn delete_sns( &self, req: DeleteSnsRequest<'_>, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source

pub async fn get_profile( &self, req: GetProfileRequest<'_>, ) -> Result<GetProfileResponse, GeweError>

Source

pub async fn update_profile( &self, req: UpdateProfileRequest<'_>, ) -> Result<(), GeweError>

Source

pub async fn update_head_img( &self, req: UpdateHeadImgRequest<'_>, ) -> Result<(), GeweError>

Source

pub async fn get_qr_code( &self, req: GetQrCodeRequest<'_>, ) -> Result<GetQrCodeResponse, GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source

pub async fn privacy_settings( &self, req: PrivacySettingsRequest<'_>, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source

pub async fn add_label( &self, req: AddLabelRequest<'_>, ) -> Result<AddLabelResponse, GeweError>

Source

pub async fn delete_label( &self, req: DeleteLabelRequest<'_>, ) -> Result<(), GeweError>

Source

pub async fn list_labels( &self, req: ListLabelRequest<'_>, ) -> Result<ListLabelResponse, GeweError>

Source

pub async fn modify_label_members( &self, req: ModifyLabelMemberRequest<'_>, ) -> Result<(), GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source

pub async fn finder_opt( &self, req: FinderOptRequest<'_>, ) -> Result<(), GeweError>

Source

pub async fn browse_finder( &self, req: BrowseFinderRequest<'_>, ) -> Result<(), GeweError>

Source

pub async fn id_fav(&self, req: IdFavRequest<'_>) -> Result<(), GeweError>

Source

pub async fn id_like(&self, req: IdLikeRequest<'_>) -> Result<(), GeweError>

Source

pub async fn like_fav_list( &self, req: LikeFavListRequest<'_>, ) -> Result<LikeFavListResponse, GeweError>

Source

pub async fn comment_finder( &self, req: CommentFinderRequest<'_>, ) -> Result<CommentFinderResponse, GeweError>

Source

pub async fn comment_list( &self, req: CommentListRequest<'_>, ) -> Result<CommentListResponse, GeweError>

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Source§

impl GeweHttpClient

Trait Implementations§

Source§

impl Clone for GeweHttpClient

Source§

fn clone(&self) -> GeweHttpClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<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