以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [原创][转帖]如何调用淘宝的SDK (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=157485) |
-- 作者:redbule2 -- 发布时间:2020/10/18 0:10:00 -- [原创][转帖]如何调用淘宝的SDK ======================================================以下是例子 ITopClient client = new DefaultTopClient(url, appkey, secret); TradeFullinfoGetRequest req = new TradeFullinfoGetRequest(); req.Fields = "tid,type,status,payment,orders,promotion_details"; req.Tid = 123456789L; TradeFullinfoGetResponse rsp = client.Execute(req, sessionKey); Output.Show(rsp.Body); SDK大小超过限制,不让传,怎么办,关键是怎么找到命名空间,怎么传参进去 Dim url = "taobao.trades.sold.increment.get" Dim appkey As String = "28512001" Dim secret As String = "4cd89f967e135f3e64a894ed323343bb" Dim ITopClient As new TopSdk.ITopClient =========================================这句报错,关键是我引用DLL以后,不知道怎么去dim 出来命名空间,然后使用 Dim client As ITopClient = New DefaultTopClient(url,appkey,secret) Dim req As TradeFullinfoGetRequest = New TradeFullinfoGetRequest() req.Fields = Functions.Execute("取字段","销售订单","淘宝") Dim rsp As TradeFullinfoGetResponse = client.Execute(req,"6100127746ed660b54d6fd3ff43b1f5ccfc101908e299f82901232563") Output.Show(rsp.Body) 以下是接口文档 [此贴子已经被作者于2020/10/18 9:54:07编辑过]
|
-- 作者:redbule2 -- 发布时间:2020/10/18 0:33:00 -- Dim url = "taobao.trades.sold.increment.get" Dim appkey As String = "28512001" Dim secret As String = "4cd89f967e135f3e64a894ed323343bb" Dim ITopClient As new TopSdk.ITopClient =========================================这句报错,关键是我引用DLL以后,不知道怎么去dim 出来命名空间,然后使用 Dim client As ITopClient = New DefaultTopClient(url,appkey,secret) Dim req As TradeFullinfoGetRequest = New TradeFullinfoGetRequest() req.Fields = Functions.Execute("取字段","销售订单","淘宝") Dim rsp As TradeFullinfoGetResponse = client.Execute(req,"6100127746ed660b54d6fd3ff43b1f5ccfc101908e299f82901232563") Output.Show(rsp.Body) 以下是接口文档 |
-- 作者:有点蓝 -- 发布时间:2020/10/18 21:10:00 -- 下载.NET SDK源码,使用vs打开源码,找到对应的类型的代码,看namespace的地方就是命名空间了,直接复制使用即可: Dim ITopClient As new Top.Api.TopSdk.ITopClient Dim client As New Top.Api.DefaultTopClient(url,appkey,secret) |