TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkContentRecommendMaterialGetRequest req = new TbkContentRecommendMaterialGetRequest();
req.setPageSize(20L);
req.setPageNum(1L);
req.setAdzoneId(123L);
req.setContentId("uc_xxxxx");
req.setSubPid("mm_123_456_789");
TbkContentRecommendMaterialGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkContentRecommendMaterialGetRequest req = new TbkContentRecommendMaterialGetRequest();
req.PageSize = 20L;
req.PageNum = 1L;
req.AdzoneId = 123L;
req.ContentId = "uc_xxxxx";
req.SubPid = "mm_123_456_789";
TbkContentRecommendMaterialGetResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkContentRecommendMaterialGetRequest;
$req->setPageSize("20");
$req->setPageNum("1");
$req->setAdzoneId("123");
$req->setContentId("uc_xxxxx");
$req->setSubPid("mm_123_456_789");
$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.content.recommend.material.get' \
-d 'partner_id=apidoc' \
-d 'sign=7B0DA371D8A903A5522DDAE3492A500C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A13%3A27' \
-d 'v=2.0' \
-d 'adzone_id=123' \
-d 'content_id=uc_xxxxx' \
-d 'page_num=1' \
-d 'page_size=20' \
-d 'sub_pid=mm_123_456_789'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkContentRecommendMaterialGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.page_size=20
req.page_num=1
req.adzone_id=123
req.content_id="uc_xxxxx"
req.sub_pid="mm_123_456_789"
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.content.recommend.material.get");
add_param(pRequest,"page_size","20");
add_param(pRequest,"page_num","1");
add_param(pRequest,"adzone_id","123");
add_param(pRequest,"content_id","uc_xxxxx");
add_param(pRequest,"sub_pid","mm_123_456_789");
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.content.recommend.material.get', {
'page_size':'20',
'page_num':'1',
'adzone_id':'123',
'content_id':'uc_xxxxx',
'sub_pid':'mm_123_456_789'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})