TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkPrivilegeGetRequest req = new TbkPrivilegeGetRequest();
req.setAdzoneId(123L);
req.setPlatform(1L);
req.setSiteId(1L);
req.setRelationId("23223");
req.setSpecialId("12345");
req.setExternalId("12345");
req.setXid("adsads");
req.setUcrowdId(1L);
req.setGetTopnRate(0L);
req.setMiniProgramLink(0L);
req.setItemId("595788830734");
req.setPromotionType("2");
req.setBizSceneId("1");
req.setManageItemPubId(1L);
req.setSkuId(1234567L);
TbkPrivilegeGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkPrivilegeGetRequest req = new TbkPrivilegeGetRequest();
req.AdzoneId = 123L;
req.Platform = 1L;
req.SiteId = 1L;
req.RelationId = "23223";
req.SpecialId = "12345";
req.ExternalId = "12345";
req.Xid = "adsads";
req.UcrowdId = 1L;
req.GetTopnRate = 0L;
req.MiniProgramLink = 0L;
req.ItemId = "595788830734";
req.PromotionType = "2";
req.BizSceneId = "1";
req.ManageItemPubId = 1L;
req.SkuId = 1234567L;
TbkPrivilegeGetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkPrivilegeGetRequest;
$req->setAdzoneId("123");
$req->setPlatform("1");
$req->setSiteId("1");
$req->setRelationId("23223");
$req->setSpecialId("12345");
$req->setExternalId("12345");
$req->setXid("adsads");
$req->setUcrowdId("1");
$req->setGetTopnRate("0");
$req->setMiniProgramLink("0");
$req->setItemId("595788830734");
$req->setPromotionType("2");
$req->setBizSceneId("1");
$req->setManageItemPubId("1");
$req->setSkuId("1234567");
$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.privilege.get' \
-d 'partner_id=apidoc' \
-d 'session=62e5dd7b-ccda-43a3-aa95-65c787a9b7cf' \
-d 'sign=A99C2018C169829C16BD2F438D5E1081' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A58%3A59' \
-d 'v=2.0' \
-d 'adzone_id=123' \
-d 'biz_scene_id=1' \
-d 'external_id=12345' \
-d 'get_topn_rate=0' \
-d 'item_id=595788830734' \
-d 'manage_item_pub_id=1' \
-d 'mini_program_link=0' \
-d 'platform=1' \
-d 'promotion_type=2' \
-d 'relation_id=23223' \
-d 'site_id=1' \
-d 'sku_id=1234567' \
-d 'special_id=12345' \
-d 'ucrowd_id=1' \
-d 'xid=adsads'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkPrivilegeGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.adzone_id=123
req.platform=1
req.site_id=1
req.relation_id="23223"
req.special_id="12345"
req.external_id="12345"
req.xid="adsads"
req.ucrowd_id=1
req.get_topn_rate=0
req.mini_program_link=0
req.item_id="595788830734"
req.promotion_type="2"
req.biz_scene_id="1"
req.manage_item_pub_id=1
req.sku_id=1234567
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.privilege.get");
add_param(pRequest,"adzone_id","123");
add_param(pRequest,"platform","1");
add_param(pRequest,"site_id","1");
add_param(pRequest,"relation_id","23223");
add_param(pRequest,"special_id","12345");
add_param(pRequest,"external_id","12345");
add_param(pRequest,"xid","adsads");
add_param(pRequest,"ucrowd_id","1");
add_param(pRequest,"get_topn_rate","0");
add_param(pRequest,"mini_program_link","0");
add_param(pRequest,"item_id","595788830734");
add_param(pRequest,"promotion_type","2");
add_param(pRequest,"biz_scene_id","1");
add_param(pRequest,"manage_item_pub_id","1");
add_param(pRequest,"sku_id","1234567");
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.privilege.get', {
'adzone_id':'123',
'platform':'1',
'site_id':'1',
'relation_id':'23223',
'special_id':'12345',
'external_id':'12345',
'xid':'adsads',
'ucrowd_id':'1',
'get_topn_rate':'0',
'mini_program_link':'0',
'item_id':'595788830734',
'promotion_type':'2',
'biz_scene_id':'1',
'manage_item_pub_id':'1',
'sku_id':'1234567'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})