TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkFeedRelationUploadRequest req = new TbkFeedRelationUploadRequest();
req.setEventId(12340L);
req.setCreativeName("xxx");
req.setUnitName("xxx");
req.setAccountName("xxx");
req.setCreativeUrl("url");
req.setCampaignId("yyy");
req.setContentId("yyy");
req.setCreativeId("yyy");
req.setAccountId("yyy");
req.setSeedContent(true);
req.setUnitId("yyy");
req.setCampaignName("xxx");
req.setOrderId("123456");
req.setOrderName("xxx");
req.setContentName("xxx");
req.setContentUrl("xxx");
TbkFeedRelationUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkFeedRelationUploadRequest req = new TbkFeedRelationUploadRequest();
req.EventId = 12340L;
req.CreativeName = "xxx";
req.UnitName = "xxx";
req.AccountName = "xxx";
req.CreativeUrl = "url";
req.CampaignId = "yyy";
req.ContentId = "yyy";
req.CreativeId = "yyy";
req.AccountId = "yyy";
req.SeedContent = true;
req.UnitId = "yyy";
req.CampaignName = "xxx";
req.OrderId = "123456";
req.OrderName = "xxx";
req.ContentName = "xxx";
req.ContentUrl = "xxx";
TbkFeedRelationUploadResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkFeedRelationUploadRequest;
$req->setEventId("12340");
$req->setCreativeName("xxx");
$req->setUnitName("xxx");
$req->setAccountName("xxx");
$req->setCreativeUrl("url");
$req->setCampaignId("yyy");
$req->setContentId("yyy");
$req->setCreativeId("yyy");
$req->setAccountId("yyy");
$req->setSeedContent("true");
$req->setUnitId("yyy");
$req->setCampaignName("xxx");
$req->setOrderId("123456");
$req->setOrderName("xxx");
$req->setContentName("xxx");
$req->setContentUrl("xxx");
$resp = $c->execute($req, $sessionKey);
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.feed.relation.upload' \
-d 'partner_id=apidoc' \
-d 'session=2d878f93-d674-427f-97a9-bd12e0829d50' \
-d 'sign=0CA662D1F8A644CCE3063608CDCEB658' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A14%3A23' \
-d 'v=2.0' \
-d 'account_id=yyy' \
-d 'account_name=xxx' \
-d 'campaign_id=yyy' \
-d 'campaign_name=xxx' \
-d 'content_id=yyy' \
-d 'content_name=xxx' \
-d 'content_url=xxx' \
-d 'creative_id=yyy' \
-d 'creative_name=xxx' \
-d 'creative_url=url' \
-d 'event_id=12340' \
-d 'order_id=123456' \
-d 'order_name=xxx' \
-d 'seed_content=true' \
-d 'unit_id=yyy' \
-d 'unit_name=xxx'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkFeedRelationUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.event_id=12340
req.creative_name="xxx"
req.unit_name="xxx"
req.account_name="xxx"
req.creative_url="url"
req.campaign_id="yyy"
req.content_id="yyy"
req.creative_id="yyy"
req.account_id="yyy"
req.seed_content=true
req.unit_id="yyy"
req.campaign_name="xxx"
req.order_id="123456"
req.order_name="xxx"
req.content_name="xxx"
req.content_url="xxx"
try:
resp= req.getResponse(sessionkey)
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.feed.relation.upload");
add_param(pRequest,"event_id","12340");
add_param(pRequest,"creative_name","xxx");
add_param(pRequest,"unit_name","xxx");
add_param(pRequest,"account_name","xxx");
add_param(pRequest,"creative_url","url");
add_param(pRequest,"campaign_id","yyy");
add_param(pRequest,"content_id","yyy");
add_param(pRequest,"creative_id","yyy");
add_param(pRequest,"account_id","yyy");
add_param(pRequest,"seed_content","true");
add_param(pRequest,"unit_id","yyy");
add_param(pRequest,"campaign_name","xxx");
add_param(pRequest,"order_id","123456");
add_param(pRequest,"order_name","xxx");
add_param(pRequest,"content_name","xxx");
add_param(pRequest,"content_url","xxx");
pResponse = top_execute(pClient,pRequest,sessionKey);
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.feed.relation.upload', {
'event_id':'12340',
'creative_name':'xxx',
'unit_name':'xxx',
'account_name':'xxx',
'creative_url':'url',
'campaign_id':'yyy',
'content_id':'yyy',
'creative_id':'yyy',
'account_id':'yyy',
'seed_content':'true',
'unit_id':'yyy',
'campaign_name':'xxx',
'order_id':'123456',
'order_name':'xxx',
'content_name':'xxx',
'content_url':'xxx'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})