This commit is contained in:
suyl
2021-05-25 15:48:43 +08:00
parent 3c3931e811
commit f38cda025d
4 changed files with 109 additions and 3 deletions

View File

@@ -35,6 +35,10 @@ func New(appID, secret, token string, config ...*platformapi.APIConfig) *API {
}
}
func (a *API) SetToken(token string) {
a.token = token
}
func (a *API) AccessAPI(action string, body string, isPost bool) (retVal map[string]interface{}, err error) {
fullURL := utils.GenerateGetURL(prodURL, action, nil)
err = platformapi.AccessPlatformAPIWithRetry(a.client,