TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbAggSyncRequest req = new XhotelBnbAggSyncRequest();
req.setBnbShid("1111");
req.setAggShid("111");
req.setAggRpId("111");
req.setAggSrid("1111");
req.setBnbRpId("11111");
req.setBnbSrid("1111");
req.setLuid("1111");
req.setXiaozhuHid("1111");
req.setAggSridCtime("2024-12-02 00:00:00");
req.setAggShidCtime("2024-12-02 00:00:00");
req.setBnbRid("1111");
req.setAggHid("1111");
req.setAggRid("1111");
req.setHotelHid("1111");
req.setHotelShid("1111");
req.setAggSridResult("分销成功");
req.setAggShidResult("分销成功");
req.setHotelRid("11111");
req.setHotelRpId("1111");
req.setHotelSrid("111");
req.setBnbHid("111");
XhotelBnbAggSyncResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelBnbAggSyncRequest req = new XhotelBnbAggSyncRequest();
req.BnbShid = "1111";
req.AggShid = "111";
req.AggRpId = "111";
req.AggSrid = "1111";
req.BnbRpId = "11111";
req.BnbSrid = "1111";
req.Luid = "1111";
req.XiaozhuHid = "1111";
req.AggSridCtime = "2024-12-02 00:00:00";
req.AggShidCtime = "2024-12-02 00:00:00";
req.BnbRid = "1111";
req.AggHid = "1111";
req.AggRid = "1111";
req.HotelHid = "1111";
req.HotelShid = "1111";
req.AggSridResult = "分销成功";
req.AggShidResult = "分销成功";
req.HotelRid = "11111";
req.HotelRpId = "1111";
req.HotelSrid = "111";
req.BnbHid = "111";
XhotelBnbAggSyncResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelBnbAggSyncRequest;
$req->setBnbShid("1111");
$req->setAggShid("111");
$req->setAggRpId("111");
$req->setAggSrid("1111");
$req->setBnbRpId("11111");
$req->setBnbSrid("1111");
$req->setLuid("1111");
$req->setXiaozhuHid("1111");
$req->setAggSridCtime("2024-12-02 00:00:00");
$req->setAggShidCtime("2024-12-02 00:00:00");
$req->setBnbRid("1111");
$req->setAggHid("1111");
$req->setAggRid("1111");
$req->setHotelHid("1111");
$req->setHotelShid("1111");
$req->setAggSridResult("分销成功");
$req->setAggShidResult("分销成功");
$req->setHotelRid("11111");
$req->setHotelRpId("1111");
$req->setHotelSrid("111");
$req->setBnbHid("111");
$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.xhotel.bnb.agg.sync' \
-d 'partner_id=apidoc' \
-d 'session=bf5f5c86-92b8-428b-aaac-24b0ae07fafc' \
-d 'sign=5EE2340A64142DD022F777AC75F0FBE1' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-27+08%3A37%3A06' \
-d 'v=2.0' \
-d 'agg_hid=1111' \
-d 'agg_rid=1111' \
-d 'agg_rp_id=111' \
-d 'agg_shid=111' \
-d 'agg_shid_ctime=2024-12-02+00%3A00%3A00' \
-d 'agg_shid_result=%E5%88%86%E9%94%80%E6%88%90%E5%8A%9F' \
-d 'agg_srid=1111' \
-d 'agg_srid_ctime=2024-12-02+00%3A00%3A00' \
-d 'agg_srid_result=%E5%88%86%E9%94%80%E6%88%90%E5%8A%9F' \
-d 'bnb_hid=111' \
-d 'bnb_rid=1111' \
-d 'bnb_rp_id=11111' \
-d 'bnb_shid=1111' \
-d 'bnb_srid=1111' \
-d 'hotel_hid=1111' \
-d 'hotel_rid=11111' \
-d 'hotel_rp_id=1111' \
-d 'hotel_shid=1111' \
-d 'hotel_srid=111' \
-d 'luid=1111' \
-d 'xiaozhu_hid=1111'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelBnbAggSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.bnb_shid="1111"
req.agg_shid="111"
req.agg_rp_id="111"
req.agg_srid="1111"
req.bnb_rp_id="11111"
req.bnb_srid="1111"
req.luid="1111"
req.xiaozhu_hid="1111"
req.agg_srid_ctime="2024-12-02 00:00:00"
req.agg_shid_ctime="2024-12-02 00:00:00"
req.bnb_rid="1111"
req.agg_hid="1111"
req.agg_rid="1111"
req.hotel_hid="1111"
req.hotel_shid="1111"
req.agg_srid_result="分销成功"
req.agg_shid_result="分销成功"
req.hotel_rid="11111"
req.hotel_rp_id="1111"
req.hotel_srid="111"
req.bnb_hid="111"
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.xhotel.bnb.agg.sync");
add_param(pRequest,"bnb_shid","1111");
add_param(pRequest,"agg_shid","111");
add_param(pRequest,"agg_rp_id","111");
add_param(pRequest,"agg_srid","1111");
add_param(pRequest,"bnb_rp_id","11111");
add_param(pRequest,"bnb_srid","1111");
add_param(pRequest,"luid","1111");
add_param(pRequest,"xiaozhu_hid","1111");
add_param(pRequest,"agg_srid_ctime","2024-12-02 00:00:00");
add_param(pRequest,"agg_shid_ctime","2024-12-02 00:00:00");
add_param(pRequest,"bnb_rid","1111");
add_param(pRequest,"agg_hid","1111");
add_param(pRequest,"agg_rid","1111");
add_param(pRequest,"hotel_hid","1111");
add_param(pRequest,"hotel_shid","1111");
add_param(pRequest,"agg_srid_result","分销成功");
add_param(pRequest,"agg_shid_result","分销成功");
add_param(pRequest,"hotel_rid","11111");
add_param(pRequest,"hotel_rp_id","1111");
add_param(pRequest,"hotel_srid","111");
add_param(pRequest,"bnb_hid","111");
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.xhotel.bnb.agg.sync', {
'bnb_shid':'1111',
'agg_shid':'111',
'agg_rp_id':'111',
'agg_srid':'1111',
'bnb_rp_id':'11111',
'bnb_srid':'1111',
'luid':'1111',
'xiaozhu_hid':'1111',
'agg_srid_ctime':'2024-12-02 00:00:00',
'agg_shid_ctime':'2024-12-02 00:00:00',
'bnb_rid':'1111',
'agg_hid':'1111',
'agg_rid':'1111',
'hotel_hid':'1111',
'hotel_shid':'1111',
'agg_srid_result':'分销成功',
'agg_shid_result':'分销成功',
'hotel_rid':'11111',
'hotel_rp_id':'1111',
'hotel_srid':'111',
'bnb_hid':'111'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})