Expand description
§wx-sdk API Documentation
§wx-sdk is a WeChat SDK written in Rust.
§Features
Fealtures can be checked at README page
§QuickStart
First, please refer to this page to provide these values: token, EncodingAESKey,EncodingMode.
use wx_sdk::wechat::{WxSdk};
use wx_sdk::mp::{ServerConfig, EncodingMode};
let sdk = WxSdk::new_with_default_token_client("app_id", "app_secret");
// Then, you can use the sdk functions, like get current menu info:
let config = ServerConfig::new("token", EncodingMode::Plain);
let mpsdk = sdk.mp(config);
async {
let menu = mpsdk.menu().get_current_selfmenu_info().await;
};§Contributing
Issue reports and Pull Requests are always welcome!
§License
wx-sdk is available under the MIT License
Re-exports§
pub use access_token::AccessToken;pub use error::SdkResult;pub use access_token::TokenClient;pub use wechat::WxSdk;
Modules§
- access_
token - The access_token releated module.
- error
- This module define the types for error handling.
- mp
- This module define the api set of wechat office account.
- This module provides the most important struct WxSdk, almost every funcition in
wx-sdktake it as a parameter.