9 releases

0.0.9 Jan 27, 2022
0.0.8 Dec 17, 2021
0.0.5 Sep 15, 2021
0.0.4 Aug 19, 2021

#2139 in Web programming

MIT license

410KB
9K SLoC

wx-sdk

CI Crates.io docs

Warning 🚧 (WIP), this crate is undering develop, api may be changed.

wx-sdk is a WeChat SDK written in Rust.

QuickStart

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;

Features

There're mp, pay, wxa features gates, we have only implemented the mp feature now. Please check FEATURES.md

Contributing

Issue reports and Pull Requests are always welcome!

License

wx-sdk is available under the MIT License

Dependencies

~8–23MB
~348K SLoC