tbopensdk

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

api列表


Documentation

Index

Constants

View Source
const (
	ApiGatewayUrl = "http://gw.api.taobao.com/router/rest"
	ApiSignMethod = "md5"
	ApiFormat     = "json"
	ApiVersion    = "2.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRequest

type DefaultRequest interface {
	AddParameter(string, string)
	GetParameters() url.Values
	GetApiName() string
	CheckParameters()
}

type DefaultResponse

type DefaultResponse interface {
	//解析返回结果
	WrapResult(result string)
	IsError() bool
}

type TopClient

type TopClient struct {
	Appkey         string
	AppSecret      string
	ProxyUrl       string
	RequestTimeOut time.Duration
	HttpClient     *http.Client
	SysParameters  *url.Values //系统变量
}

func (*TopClient) CreateSign

func (u *TopClient) CreateSign(params url.Values)

func (*TopClient) CreateStrParam

func (u *TopClient) CreateStrParam(params url.Values) string

func (*TopClient) Exec

func (u *TopClient) Exec(request DefaultRequest, response DefaultResponse) error

func (*TopClient) Execute

func (u *TopClient) Execute(params url.Values) (string, error)

func (*TopClient) Init

func (u *TopClient) Init(appKey, appSecret, sessionkey string)

func (*TopClient) PostRequest

func (u *TopClient) PostRequest(uri string) (string, error)

发送POST请求

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL