/// <summary> /// 初始化 /// </summary> public YbClient(AccessToken token, YbConfig config) { share = new ShareApi(token, config); friend = new FriendApi(token, config); group = new GroupApi(token, config); msg = new MsgApi(token, config); pay = new PayApi(token, config); school = new SchoolApi(token, config); user = new UserApi(token, config); }
/// <summary> /// 初始化 /// </summary> public YbClient(string token) { share = new ShareApi(token); friend = new FriendApi(token); group = new GroupApi(token); msg = new MsgApi(token); pay = new PayApi(token); school = new SchoolApi(token); user = new UserApi(token); }
/// <summary> /// 可以利用自己实例化的ApiContext方式构造Client,APIContext包括相关配置和accesstoken /// 当不想用配置文件中的配置时可通过这种方式更改配置 /// </summary> /// <param name="context"></param> public YbClient(ApiContext context) { Oauther = new OauthApi(context); share = new ShareApi(context); friend = new FriendApi(context); group = new GroupApi(context); msg = new MsgApi(context); pay = new PayApi(context); school = new SchoolApi(context); user = new UserApi(context); }
public void Init() { api = new SchoolApi(GlobalConfig.accessToken, GlobalConfig.Webconfig); }