TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaRelatedRuleQueryRequest req = new AlibabaRelatedRuleQueryRequest();
AlibabaRelatedRuleQueryRequest.RelatedPartyParam obj1 = new AlibabaRelatedRuleQueryRequest.RelatedPartyParam();
obj1.setCompanyId(290L);
obj1.setCompanyName("阿里巴巴中国");
obj1.setRelatedPartyNames("");
obj1.setRelatedPartyGroup("alibaba");
req.setRelatedPartyParam(obj1);
req.setSystemCode("test");
req.setSystemSecret("test");
AlibabaRelatedRuleQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaRelatedRuleQueryRequest req = new AlibabaRelatedRuleQueryRequest();
AlibabaRelatedRuleQueryRequest.RelatedPartyParamDomain obj1 = new AlibabaRelatedRuleQueryRequest.RelatedPartyParamDomain();
obj1.CompanyId = 290L;
obj1.CompanyName = "阿里巴巴中国";
obj1.RelatedPartyNames = "";
obj1.RelatedPartyGroup = "alibaba";
req.RelatedPartyParam_ = obj1;
req.SystemCode = "test";
req.SystemSecret = "test";
AlibabaRelatedRuleQueryResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaRelatedRuleQueryRequest;
$related_party_param = new RelatedPartyParam;
$related_party_param->company_id="290";
$related_party_param->company_name="阿里巴巴中国";
$related_party_param->related_party_names="";
$related_party_param->related_party_group="alibaba";
$req->setRelatedPartyParam(json_encode($related_party_param));
$req->setSystemCode("test");
$req->setSystemSecret("test");
$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=alibaba.related.rule.query' \
-d 'partner_id=apidoc' \
-d 'sign=36896F3B5981A0CB8D4EF622175C3B93' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-14+19%3A04%3A17' \
-d 'v=2.0' \
-d 'related_party_param=null' \
-d 'system_code=test' \
-d 'system_secret=test'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaRelatedRuleQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.related_party_param="数据结构示例JSON格式"
req.system_code="test"
req.system_secret="test"
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,"alibaba.related.rule.query");
add_param(pRequest,"related_party_param","数据结构JSON示例");
add_param(pRequest,"system_code","test");
add_param(pRequest,"system_secret","test");
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('alibaba.related.rule.query', {
'related_party_param':'数据结构JSON示例',
'system_code':'test',
'system_secret':'test'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})