TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkMediaDataUploadRequest req = new TbkMediaDataUploadRequest();
req.setContId("123");
req.setContUrl("taobao.s.click.com_cont_id");
req.setCreateTime("2015-01-01 12:00:00");
req.setPacketSign(1L);
req.setWeightSign(1L);
req.setDarenNickname("abc");
req.setDarenPid("mm_12345_0_0");
req.setReadNumber(123L);
req.setInteractNumber(123L);
req.setItemList("123,45");
req.setExtra("123");
TbkMediaDataUploadResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkMediaDataUploadRequest req = new TbkMediaDataUploadRequest();
req.ContId = "123";
req.ContUrl = "taobao.s.click.com_cont_id";
req.CreateTime = "2015-01-01 12:00:00";
req.PacketSign = 1L;
req.WeightSign = 1L;
req.DarenNickname = "abc";
req.DarenPid = "mm_12345_0_0";
req.ReadNumber = 123L;
req.InteractNumber = 123L;
req.ItemList = "123,45";
req.Extra = "123";
TbkMediaDataUploadResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkMediaDataUploadRequest;
$req->setContId("123");
$req->setContUrl("taobao.s.click.com_cont_id");
$req->setCreateTime("2015-01-01 12:00:00");
$req->setPacketSign("1");
$req->setWeightSign("1");
$req->setDarenNickname("abc");
$req->setDarenPid("mm_12345_0_0");
$req->setReadNumber("123");
$req->setInteractNumber("123");
$req->setItemList("123,45");
$req->setExtra("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.media.data.upload' \
-d 'partner_id=apidoc' \
-d 'sign=DB5BD68340FB26FB4763CBCD3C9C01C3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A49%3A37' \
-d 'v=2.0' \
-d 'cont_id=123' \
-d 'cont_url=taobao.s.click.com_cont_id' \
-d 'create_time=2015-01-01+12%3A00%3A00' \
-d 'daren_nickname=abc' \
-d 'daren_pid=mm_12345_0_0' \
-d 'extra=123' \
-d 'interact_number=123' \
-d 'item_list=123%2C45' \
-d 'packet_sign=1' \
-d 'read_number=123' \
-d 'weight_sign=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkMediaDataUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.cont_id="123"
req.cont_url="taobao.s.click.com_cont_id"
req.create_time="2015-01-01 12:00:00"
req.packet_sign=1
req.weight_sign=1
req.daren_nickname="abc"
req.daren_pid="mm_12345_0_0"
req.read_number=123
req.interact_number=123
req.item_list="123,45"
req.extra="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.media.data.upload");
add_param(pRequest,"cont_id","123");
add_param(pRequest,"cont_url","taobao.s.click.com_cont_id");
add_param(pRequest,"create_time","2015-01-01 12:00:00");
add_param(pRequest,"packet_sign","1");
add_param(pRequest,"weight_sign","1");
add_param(pRequest,"daren_nickname","abc");
add_param(pRequest,"daren_pid","mm_12345_0_0");
add_param(pRequest,"read_number","123");
add_param(pRequest,"interact_number","123");
add_param(pRequest,"item_list","123,45");
add_param(pRequest,"extra","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.media.data.upload', {
'cont_id':'123',
'cont_url':'taobao.s.click.com_cont_id',
'create_time':'2015-01-01 12:00:00',
'packet_sign':'1',
'weight_sign':'1',
'daren_nickname':'abc',
'daren_pid':'mm_12345_0_0',
'read_number':'123',
'interact_number':'123',
'item_list':'123,45',
'extra':'123'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})