TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgContentMaterialRequest req = new TbkDgContentMaterialRequest();
req.setAdzoneId(12345678L);
req.setPageNum(2L);
req.setPageSize(20L);
req.setStartTime("2015-01-01 12:00:00");
req.setEndTime("2015-02-01 12:00:00");
req.setItemIds("qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd");
req.setSceneId("1");
req.setPriceFloor("9.9");
req.setPriceCeiling("19.9");
req.setUseScene("3,4,5,6,7");
TbkDgContentMaterialResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkDgContentMaterialRequest req = new TbkDgContentMaterialRequest();
req.AdzoneId = 12345678L;
req.PageNum = 2L;
req.PageSize = 20L;
req.StartTime = "2015-01-01 12:00:00";
req.EndTime = "2015-02-01 12:00:00";
req.ItemIds = "qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd";
req.SceneId = "1";
req.PriceFloor = "9.9";
req.PriceCeiling = "19.9";
req.UseScene = "3,4,5,6,7";
TbkDgContentMaterialResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkDgContentMaterialRequest;
$req->setAdzoneId("12345678");
$req->setPageNum("2");
$req->setPageSize("20");
$req->setStartTime("2015-01-01 12:00:00");
$req->setEndTime("2015-02-01 12:00:00");
$req->setItemIds("qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd");
$req->setSceneId("1");
$req->setPriceFloor("9.9");
$req->setPriceCeiling("19.9");
$req->setUseScene("3,4,5,6,7");
$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.dg.content.material' \
-d 'partner_id=apidoc' \
-d 'sign=C408FDA54F1F056E59FF491B60FC39E5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A01%3A53' \
-d 'v=2.0' \
-d 'adzone_id=12345678' \
-d 'end_time=2015-02-01+12%3A00%3A00' \
-d 'item_ids=qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9%2C5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd' \
-d 'page_num=2' \
-d 'page_size=20' \
-d 'price_ceiling=19.9' \
-d 'price_floor=9.9' \
-d 'scene_id=1' \
-d 'start_time=2015-01-01+12%3A00%3A00' \
-d 'use_scene=3%2C4%2C5%2C6%2C7'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkDgContentMaterialRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.adzone_id=12345678
req.page_num=2
req.page_size=20
req.start_time="2015-01-01 12:00:00"
req.end_time="2015-02-01 12:00:00"
req.item_ids="qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd"
req.scene_id="1"
req.price_floor="9.9"
req.price_ceiling="19.9"
req.use_scene="3,4,5,6,7"
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.dg.content.material");
add_param(pRequest,"adzone_id","12345678");
add_param(pRequest,"page_num","2");
add_param(pRequest,"page_size","20");
add_param(pRequest,"start_time","2015-01-01 12:00:00");
add_param(pRequest,"end_time","2015-02-01 12:00:00");
add_param(pRequest,"item_ids","qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd");
add_param(pRequest,"scene_id","1");
add_param(pRequest,"price_floor","9.9");
add_param(pRequest,"price_ceiling","19.9");
add_param(pRequest,"use_scene","3,4,5,6,7");
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.dg.content.material', {
'adzone_id':'12345678',
'page_num':'2',
'page_size':'20',
'start_time':'2015-01-01 12:00:00',
'end_time':'2015-02-01 12:00:00',
'item_ids':'qYtxrMJOC8tmtM-Qq0Z65Sbbq5DqZ9,5K5QvIxt49NADH0AwcMtV-83PjG2AU0bba4QyPFqd',
'scene_id':'1',
'price_floor':'9.9',
'price_ceiling':'19.9',
'use_scene':'3,4,5,6,7'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})