gtopsdk

package module
v0.0.0-...-e10ab8d Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

README

gtopsdk

淘宝开放平台SDK go-topsdk

sample

package main

import "github.com/chaojihaohuo/gtopsdk"

import "github.com/chaojihaohuo/gtopsdk/requests"

import "github.com/chaojihaohuo/gtopsdk/responses"

import "fmt"

func checkErr(err error) {
	if err != nil {
		panic(err)
	}
}

func main() {
	apiGateway, appKey, appSecret := "", "", ""
	client, err := gtopsdk.NewTopClient(apiGateway, appKey, appSecret)
	checkErr(err)

	req := requests.NewTaobaoTimeGetRequest()
	res := responses.TaobaoTimeGetResponse{}

	err = client.Do(req, &res)
	checkErr(err)

	fmt.Println(res)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TopClient

type TopClient struct {
	// contains filtered or unexported fields
}

TopClient TOP默认客户端

func NewTopClient

func NewTopClient(apiGateway, appKey, appSecret string) (*TopClient, error)

NewTopClient 创建 TopClient 的新实例

func (TopClient) Do

func (c TopClient) Do(r requests.ITopRequest, respModel interface{}) error

Do 执行请求

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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