1
This commit is contained in:
@@ -19,8 +19,8 @@ const (
|
||||
ServerUrl4 = "http://qimen.api.taobao.com/top/router/qmtest" // 沙箱环境http
|
||||
)
|
||||
|
||||
func NewTaoVegetable(appKey, appSecret, serverUrl string) API {
|
||||
return API{client: topsdk.NewDefaultTopClient(appKey, appSecret, serverUrl, 2000, 2000)}
|
||||
func NewTaoVegetable(appKey, appSecret, serverUrl string) *API {
|
||||
return &API{client: topsdk.NewDefaultTopClient(appKey, appSecret, serverUrl, 2000, 2000)}
|
||||
}
|
||||
|
||||
type API struct {
|
||||
@@ -29,7 +29,19 @@ type API struct {
|
||||
refreshToken string
|
||||
}
|
||||
|
||||
func (a API) GetStoreToken(code, uuId string) (*StoreTokenInfo, error) {
|
||||
func (a *API) GetVendorOrgCode() string {
|
||||
return a.client.AppKey
|
||||
}
|
||||
|
||||
func (a *API) SetToken(token string) {
|
||||
a.token = token
|
||||
}
|
||||
|
||||
func (a *API) SetRefreshToken(refreshToken string) {
|
||||
a.refreshToken = refreshToken
|
||||
}
|
||||
|
||||
func (a *API) GetStoreToken(code, uuId string) (*StoreTokenInfo, error) {
|
||||
param := &request.TaobaoTopAuthTokenCreateRequest{
|
||||
Code: &code,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user