TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkScGeneralLinkParseRequest req = new TbkScGeneralLinkParseRequest();
req.setRelationId("123456");
req.setAdzoneId(123456L);
TbkScGeneralLinkParseRequest.LkMaterialDTO obj1 = new TbkScGeneralLinkParseRequest.LkMaterialDTO();
obj1.setMaterialUrl("s.click.taobao.com");
req.setMaterialDto(obj1);
req.setFields("origin_pid");
TbkScGeneralLinkParseResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkScGeneralLinkParseRequest req = new TbkScGeneralLinkParseRequest();
req.RelationId = "123456";
req.AdzoneId = 123456L;
TbkScGeneralLinkParseRequest.LkMaterialDTODomain obj1 = new TbkScGeneralLinkParseRequest.LkMaterialDTODomain();
obj1.MaterialUrl = "s.click.taobao.com";
req.MaterialDto_ = obj1;
req.Fields = "origin_pid";
TbkScGeneralLinkParseResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkScGeneralLinkParseRequest;
$req->setRelationId("123456");
$req->setAdzoneId("123456");
$material_dto = new LkMaterialDTO;
$material_dto->material_url="s.click.taobao.com";
$req->setMaterialDto(json_encode($material_dto));
$req->setFields("origin_pid");
$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.sc.general.link.parse' \
-d 'partner_id=apidoc' \
-d 'session=2007980b-ea18-4f5f-99cc-afbe9725c789' \
-d 'sign=BC2F4E379D21A5CC59883DF4BD87E585' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A08%3A10' \
-d 'v=2.0' \
-d 'adzone_id=123456' \
-d 'fields=origin_pid' \
-d 'material_dto=material_dto' \
-d 'relation_id=123456'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkScGeneralLinkParseRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.relation_id="123456"
req.adzone_id=123456
req.material_dto="material_dto"
req.fields="origin_pid"
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.sc.general.link.parse");
add_param(pRequest,"relation_id","123456");
add_param(pRequest,"adzone_id","123456");
add_param(pRequest,"material_dto","数据结构JSON示例");
add_param(pRequest,"fields","origin_pid");
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.sc.general.link.parse', {
'relation_id':'123456',
'adzone_id':'123456',
'material_dto':'数据结构JSON示例',
'fields':'origin_pid'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})