TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkShopRecommendGetRequest req = new TbkShopRecommendGetRequest();
req.setCount(20L);
req.setFields("user_id,shop_title,shop_type,seller_nick,pict_url,shop_url");
req.setPlatform(1L);
req.setUserId(123L);
TbkShopRecommendGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkShopRecommendGetRequest req = new TbkShopRecommendGetRequest();
req.Count = 20L;
req.Fields = "user_id,shop_title,shop_type,seller_nick,pict_url,shop_url";
req.Platform = 1L;
req.UserId = 123L;
TbkShopRecommendGetResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkShopRecommendGetRequest;
$req->setCount("20");
$req->setFields("user_id,shop_title,shop_type,seller_nick,pict_url,shop_url");
$req->setPlatform("1");
$req->setUserId("123");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.tbk.shop.recommend.get' \
-d 'partner_id=apidoc' \
-d 'sign=1D8507B995B55864958EB9664551AEF6' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A53%3A53' \
-d 'v=2.0' \
-d 'count=20' \
-d 'fields=user_id%2Cshop_title%2Cshop_type%2Cseller_nick%2Cpict_url%2Cshop_url' \
-d 'platform=1' \
-d 'user_id=123'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkShopRecommendGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.count=20
req.fields="user_id,shop_title,shop_type,seller_nick,pict_url,shop_url"
req.platform=1
req.user_id=123
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.tbk.shop.recommend.get");
add_param(pRequest,"count","20");
add_param(pRequest,"fields","user_id,shop_title,shop_type,seller_nick,pict_url,shop_url");
add_param(pRequest,"platform","1");
add_param(pRequest,"user_id","123");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.tbk.shop.recommend.get', {
'count':'20',
'fields':'user_id,shop_title,shop_type,seller_nick,pict_url,shop_url',
'platform':'1',
'user_id':'123'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})