| Crates.io | wx-sdk |
| lib.rs | wx-sdk |
| version | 0.0.9 |
| created_at | 2021-08-12 10:11:17.001478+00 |
| updated_at | 2022-01-27 04:08:45.545716+00 |
| description | A Wechat SDK written in Rust |
| homepage | https://github.com/ilovelll/wx-sdk |
| repository | https://github.com/ilovelll/wx-sdk |
| max_upload_size | |
| id | 435185 |
| size | 422,842 |
Warning 🚧 (WIP), this crate is undering develop, api may be changed.
wx-sdk is a WeChat SDK written in Rust.First, please refer to this page to provide these values: token, EncodingAESKey,EncodingMode.
use wx_sdk::wechat::WxSdk;
let sdk = WxSdk::new_with_default_token_client("app_id", "app_secret");
Then, you can use the sdk functions, like get current menu info:
use wx_sdk::mp::{ServerConfig, EncodingMode};
let config = ServerConfig::new("token", EncodingMode::Plain);
let mpsdk = WxSdk::mp(sdk, config); // or sdk.mp(config);
let menu = mpsdk.menu().get_current_selfmenu_info().await;
There're mp, pay, wxa features gates, we have only implemented the mp feature now. Please check FEATURES.md
Issue reports and Pull Requests are always welcome!
wx-sdk is available under the MIT License