/// <summary> /// 初始化,直接传入TokenData /// </summary> /// <param name="tokenData">token</param> /// <param name="funcGetTokenData">获取新TokenData的委托</param> public ApiHelper(TokenData tokenData, Func <TokenData> funcGetTokenData = null) { oAuthToken = tokenData; _checkToken = true; _funcGetTokenData = funcGetTokenData; _YouZanClient = new DefaultYZClient(); }
public ApiHelper(string clientId, string clientSecret, string grantId) { this.ClientId = clientId; this.ClientSecret = clientSecret; this.GrantId = grantId; _YouZanClient = new DefaultYZClient(); this.GetAccessToken(); }
public ApiHelper(string clientId, string clientSecret, string grantId) { this.ClientId = clientId; this.ClientSecret = clientSecret; this.GrantId = grantId; _YouZanClient = new DefaultYZClient(); Silent silent = new Silent(this.ClientId, this.ClientSecret, this.GrantId); oAuthToken = silent.GetToken(); }