Giter Site home page Giter Site logo

tksdk's Introduction

淘客sdk

Installation

Download and install it:

$ go get -u github.com/mimicode/tksdk

Import it in your code:

import "github.com/mimicode/tksdk/tbopensdk"

Examples

	//初始化TopClient
	client := &TopClient{}
	client.Init(appKey, appSecret, sessionKey)

	//初始化请求接口信息
	getRequest := &request2.TbkItemInfoGetRequest{}
	getRequest.AddParameter("num_iids", "640057354722")
	getRequest.AddParameter("platform", "1")
	getRequest.AddParameter("ip", "11.22.33.43")
	getRequest.AddParameter("get_topn_rate", "1")
	//初始化结果类型
	var getResponse DefaultResponse = &tbkiteminfoget.Response{}
	//执行请求接口得到结果
	err := client.Exec(getRequest, getResponse)
	if err != nil {
		t.Log(err)
	} else {
		result := getResponse.(*tbkiteminfoget.Response)

		if result.IsError() {
			fmt.Println(result.Body)
		} else {
			items := result.TbkItemInfoGetResult.Results.NTbkItem
			for _, v := range items {
				fmt.Println(v.Title)
			}
		}

	}

tksdk's People

Contributors

mimicode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tksdk's Issues

jd.union.open.promotion.common.get

调用JdUnionOpenPromotionCommonGetRequest方法,返回{"error_response":{"code":"67","en_desc":"platform connecting service process unknown exception information(Solution reference: https://jos.jd.com/commondoc?listId=171)","zh_desc":"java.lang.NumberFormatException: For input string: ""(解决方案参考: https://jos.jd.com/commondoc?listId=171)"}}
经过查找京东文档code67是平台连接后端服务处理过程中出现未知异常信息,你有遇到过吗

拼多多pdd.ddk.order.list.increment.get参数不全

pddopensdk/response/pddddkorderlistincrementget/pddddkorderlistincrementget.go -> OrderList
参数不全。
依据官方文档
https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.list.increment.get
和返回的body。

  • OrderReceiveTime
  • OrderSettleTime
  • OrderVerifyTime
  • MallName
  • GoodsSign
  • FailReason
  • PlatformDiscount

这些参数都是存在的。但返回的OrderList没有这些参数。

/pddopensdk/response/pddddkorderlistrangeget/pddddkorderlistrangeget.go -> OrderList 返回的参数都正常。

请问是故意的还是不小心?

拼多多相关

拼多多的test例子中,TopClient是需要自己实现么?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.