a
This commit is contained in:
@@ -40,17 +40,16 @@ func (a *API) SetToken(token string) {
|
||||
a.accessToken = token
|
||||
}
|
||||
|
||||
func New(accessToken, appID, appSecret string, config ...*platformapi.APIConfig) *API {
|
||||
func New(appID, appSecret string, config ...*platformapi.APIConfig) *API {
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
curConfig = *config[0]
|
||||
}
|
||||
return &API{
|
||||
accessToken: accessToken,
|
||||
appID: appID,
|
||||
appSecret: appSecret,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
appID: appID,
|
||||
appSecret: appSecret,
|
||||
client: &http.Client{Timeout: curConfig.ClientTimeout},
|
||||
config: &curConfig,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user