TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgVegasTljCreateRequest req = new TbkDgVegasTljCreateRequest();
req.setSecurityLevel(0L);
req.setUseStartTime("2019-01-29");
req.setUseEndTimeMode(1L);
req.setUseEndTime("5");
req.setSendEndTime(StringUtils.parseDateTime("2018-09-01 00:00:00"));
req.setSendStartTime(StringUtils.parseDateTime("2018-09-01 00:00:00"));
req.setPerFace("10");
req.setSecuritySwitch(true);
req.setUserTotalWinNumLimit(1L);
req.setName("淘礼金来啦");
req.setTotalNum(10L);
req.setItemId("12323");
req.setCampaignType("MKT");
req.setUseThreshold("2");
req.setAdzoneId(1234567L);
TbkDgVegasTljCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkDgVegasTljCreateRequest req = new TbkDgVegasTljCreateRequest();
req.SecurityLevel = 0L;
req.UseStartTime = "2019-01-29";
req.UseEndTimeMode = 1L;
req.UseEndTime = "5";
req.SendEndTime = DateTime.Parse("2018-09-01 00:00:00");
req.SendStartTime = DateTime.Parse("2018-09-01 00:00:00");
req.PerFace = "10";
req.SecuritySwitch = true;
req.UserTotalWinNumLimit = 1L;
req.Name = "淘礼金来啦";
req.TotalNum = 10L;
req.ItemId = "12323";
req.CampaignType = "MKT";
req.UseThreshold = "2";
req.AdzoneId = 1234567L;
TbkDgVegasTljCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkDgVegasTljCreateRequest;
$req->setSecurityLevel("0");
$req->setUseStartTime("2019-01-29");
$req->setUseEndTimeMode("1");
$req->setUseEndTime("5");
$req->setSendEndTime("2018-09-01 00:00:00");
$req->setSendStartTime("2018-09-01 00:00:00");
$req->setPerFace("10");
$req->setSecuritySwitch("true");
$req->setUserTotalWinNumLimit("1");
$req->setName("淘礼金来啦");
$req->setTotalNum("10");
$req->setItemId("12323");
$req->setCampaignType("MKT");
$req->setUseThreshold("2");
$req->setAdzoneId("1234567");
$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.vegas.tlj.create' \
-d 'partner_id=apidoc' \
-d 'sign=F2B86233BEE2EA4583F7A550F9268962' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A56%3A16' \
-d 'v=2.0' \
-d 'adzone_id=1234567' \
-d 'campaign_type=MKT' \
-d 'item_id=12323' \
-d 'name=%E6%B7%98%E7%A4%BC%E9%87%91%E6%9D%A5%E5%95%A6' \
-d 'per_face=10' \
-d 'security_level=0' \
-d 'security_switch=true' \
-d 'send_end_time=2018-09-01+00%3A00%3A00' \
-d 'send_start_time=2018-09-01+00%3A00%3A00' \
-d 'total_num=10' \
-d 'use_end_time=5' \
-d 'use_end_time_mode=1' \
-d 'use_start_time=2019-01-29' \
-d 'use_threshold=2' \
-d 'user_total_win_num_limit=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkDgVegasTljCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.security_level=0
req.use_start_time="2019-01-29"
req.use_end_time_mode=1
req.use_end_time="5"
req.send_end_time="2018-09-01 00:00:00"
req.send_start_time="2018-09-01 00:00:00"
req.per_face="10"
req.security_switch=true
req.user_total_win_num_limit=1
req.name="淘礼金来啦"
req.total_num=10
req.item_id="12323"
req.campaign_type="MKT"
req.use_threshold="2"
req.adzone_id=1234567
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.vegas.tlj.create");
add_param(pRequest,"security_level","0");
add_param(pRequest,"use_start_time","2019-01-29");
add_param(pRequest,"use_end_time_mode","1");
add_param(pRequest,"use_end_time","5");
add_param(pRequest,"send_end_time","2018-09-01 00:00:00");
add_param(pRequest,"send_start_time","2018-09-01 00:00:00");
add_param(pRequest,"per_face","10");
add_param(pRequest,"security_switch","true");
add_param(pRequest,"user_total_win_num_limit","1");
add_param(pRequest,"name","淘礼金来啦");
add_param(pRequest,"total_num","10");
add_param(pRequest,"item_id","12323");
add_param(pRequest,"campaign_type","MKT");
add_param(pRequest,"use_threshold","2");
add_param(pRequest,"adzone_id","1234567");
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.vegas.tlj.create', {
'security_level':'0',
'use_start_time':'2019-01-29',
'use_end_time_mode':'1',
'use_end_time':'5',
'send_end_time':'2018-09-01 00:00:00',
'send_start_time':'2018-09-01 00:00:00',
'per_face':'10',
'security_switch':'true',
'user_total_win_num_limit':'1',
'name':'淘礼金来啦',
'total_num':'10',
'item_id':'12323',
'campaign_type':'MKT',
'use_threshold':'2',
'adzone_id':'1234567'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})