Expand description
This module provides the most important struct WxSdk, almost every funcition in wx-sdk
take it as a parameter.
You can construct it with a ServerConfig.
Example
use wx_sdk::wechat::WxSdk;
let sdk = WxSdk::new_with_default_token_client("app_id", "app_secret");
above example use the default token client, you could implement one that impl trait AccessTokenProvider by yourself.
ⓘ
let token_clinet = MyTokenClient{};
let sdk = WxSdk::new("app_id", "app_sercret", config, token_client);
Structs§
- WxSdk
- This is the sdk object. We provide a
new
method to construct it.
Traits§
- WxApi
Request Builder - This trait warps two common http request method that wx_get and wx_post with wechat api server.