Documentation
¶
Overview ¶
淘宝开放平台的 go 语言 SDK, MIT许可。 自带web小工具: 可测试基本流程, 可根据 ApiMetadata.xml 重新生成SDK源码并编译, 保持与淘宝同步
Index ¶
- Constants
- Variables
- func GetUrlForAuth(appKey, redirectUri, state string) (*url.URL, error)
- func Init(key string, secret string, isTop bool)
- func SetRequestUrl(requestUrl string)
- type ErrResponse
- type TaobaoConfig
- type TaobaoMethodRequest
- type TaobaoRequest
- type TaobaoRequestI
- type TaobaoTopErrResponse
- type TokenGetRequest
- func (t *TokenGetRequest) GetResponse() (*TokenGetResponse, []byte, error)
- func (t *TokenGetRequest) SetAppKey(val string)
- func (t *TokenGetRequest) SetAppSecret(val string)
- func (t *TokenGetRequest) SetCode(val string)
- func (t *TokenGetRequest) SetRedirectUri(val string)
- func (t *TokenGetRequest) SetState(val string)
- type TokenGetResponse
- type TokenRefreshRequest
Constants ¶
View Source
const VersionNo = "0.0.1"
Variables ¶
View Source
var ( InsecureSkipVerify = true // 相信淘宝服务器,跳过对其检查,减少客户端配置问题 DisableCompression = false // 默认压缩数据 )
Functions ¶
func SetRequestUrl ¶
func SetRequestUrl(requestUrl string)
Types ¶
type ErrResponse ¶
type TaobaoConfig ¶
type TaobaoConfig struct {
// contains filtered or unexported fields
}
type TaobaoMethodRequest ¶
type TaobaoMethodRequest struct {
TaobaoRequest
}
func (*TaobaoMethodRequest) GetResponse ¶
func (t *TaobaoMethodRequest) GetResponse(accessToken, apiMethodName string, resp interface{}) ([]byte, error)
type TaobaoRequest ¶
type TaobaoRequest struct {
// contains filtered or unexported fields
}
func (*TaobaoRequest) GetReqUrl ¶
func (t *TaobaoRequest) GetReqUrl() string
func (*TaobaoRequest) GetValue ¶
func (t *TaobaoRequest) GetValue(key string) string
func (*TaobaoRequest) GetValues ¶
func (t *TaobaoRequest) GetValues() url.Values
func (*TaobaoRequest) SetReqUrl ¶
func (t *TaobaoRequest) SetReqUrl(resUrl string)
func (*TaobaoRequest) SetValue ¶
func (t *TaobaoRequest) SetValue(key, value string)
type TaobaoRequestI ¶
type TaobaoTopErrResponse ¶
type TaobaoTopErrResponse struct { Error string `json:"error"` ErrorDescription string `json:"error_description"` ErrResponse *ErrResponse `json:"error_response"` }
func (*TaobaoTopErrResponse) GetErr ¶
func (t *TaobaoTopErrResponse) GetErr() string
type TokenGetRequest ¶
type TokenGetRequest struct {
TaobaoRequest
}
func (*TokenGetRequest) GetResponse ¶
func (t *TokenGetRequest) GetResponse() (*TokenGetResponse, []byte, error)
func (*TokenGetRequest) SetAppKey ¶
func (t *TokenGetRequest) SetAppKey(val string)
func (*TokenGetRequest) SetAppSecret ¶
func (t *TokenGetRequest) SetAppSecret(val string)
func (*TokenGetRequest) SetCode ¶
func (t *TokenGetRequest) SetCode(val string)
func (*TokenGetRequest) SetRedirectUri ¶
func (t *TokenGetRequest) SetRedirectUri(val string)
func (*TokenGetRequest) SetState ¶
func (t *TokenGetRequest) SetState(val string)
type TokenGetResponse ¶
type TokenGetResponse struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` ReExpiresIn int `json:"re_expires_in"` R1ExpiresIn int `json:"r1_expires_in"` R2ExpiresIn int `json:"r2_expires_in"` W1ExpiresIn int `json:"w1_expires_in"` W2ExpiresIn int `json:"w2_expires_in"` TaobaoUserNick string `json:"taobao_user_nick"` TaobaoUserId string `json:"taobao_user_id"` SubTaobaoUserId string `json:"sub_taobao_user_id"` SubTaobaoUserNick string `json:"sub_taobao_user_nick"` }
type TokenRefreshRequest ¶
type TokenRefreshRequest struct {
TaobaoRequest
}
func (*TokenRefreshRequest) GetResponse ¶
func (t *TokenRefreshRequest) GetResponse() (*TokenGetResponse, []byte, error)
func (*TokenRefreshRequest) SetRefreshToken ¶
func (t *TokenRefreshRequest) SetRefreshToken(val string)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
api
|
|
eticket
电子码商相关功能 auto sdk from taobao ApiMetadata.xml version 20170816 auther: [email protected]
|
电子码商相关功能 auto sdk from taobao ApiMetadata.xml version 20170816 auther: [email protected] |
user
提供了用户基本信息查询功能 auto sdk from taobao ApiMetadata.xml version 20131207 auther: [email protected]
|
提供了用户基本信息查询功能 auto sdk from taobao ApiMetadata.xml version 20131207 auther: [email protected] |
web 小工具, 测试淘宝GoSdk基本流程, 能根据淘宝 ApiMetadata.xml 重新生成SDK源码并编译
|
web 小工具, 测试淘宝GoSdk基本流程, 能根据淘宝 ApiMetadata.xml 重新生成SDK源码并编译 |
Click to show internal directories.
Click to hide internal directories.