TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbhotelDataSyncRequest req = new XhotelBnbhotelDataSyncRequest();
req.setBnbName("简约复式双床房");
req.setDistributedId("376723802423589");
req.setBnbRid("2839624385555");
req.setShid("81909014");
req.setUtime("2024/11/19 15:05");
req.setHotelHid("704856941555");
req.setResult("分销成功");
req.setLuid("luid");
req.setName("广州时代美术馆简约公寓");
req.setXiaozhuHid("11111111");
req.setHotelRid("222222");
req.setCtime("2024-12-23 00:00:00");
req.setBnbHid("234234");
req.setHotelResult("房型分销成功");
XhotelBnbhotelDataSyncResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelBnbhotelDataSyncRequest req = new XhotelBnbhotelDataSyncRequest();
req.BnbName = "简约复式双床房";
req.DistributedId = "376723802423589";
req.BnbRid = "2839624385555";
req.Shid = "81909014";
req.Utime = "2024/11/19 15:05";
req.HotelHid = "704856941555";
req.Result = "分销成功";
req.Luid = "luid";
req.Name = "广州时代美术馆简约公寓";
req.XiaozhuHid = "11111111";
req.HotelRid = "222222";
req.Ctime = "2024-12-23 00:00:00";
req.BnbHid = "234234";
req.HotelResult = "房型分销成功";
XhotelBnbhotelDataSyncResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelBnbhotelDataSyncRequest;
$req->setBnbName("简约复式双床房");
$req->setDistributedId("376723802423589");
$req->setBnbRid("2839624385555");
$req->setShid("81909014");
$req->setUtime("2024/11/19 15:05");
$req->setHotelHid("704856941555");
$req->setResult("分销成功");
$req->setLuid("luid");
$req->setName("广州时代美术馆简约公寓");
$req->setXiaozhuHid("11111111");
$req->setHotelRid("222222");
$req->setCtime("2024-12-23 00:00:00");
$req->setBnbHid("234234");
$req->setHotelResult("房型分销成功");
$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.bnbhotel.data.sync' \
-d 'partner_id=apidoc' \
-d 'session=af19788a-6cf4-443f-8be4-9ccbdcab5cde' \
-d 'sign=509AA6A265F94750FDD5E26DB89521DE' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-03+07%3A57%3A01' \
-d 'v=2.0' \
-d 'bnb_hid=234234' \
-d 'bnb_name=%E7%AE%80%E7%BA%A6%E5%A4%8D%E5%BC%8F%E5%8F%8C%E5%BA%8A%E6%88%BF' \
-d 'bnb_rid=2839624385555' \
-d 'ctime=2024-12-23+00%3A00%3A00' \
-d 'distributed_id=376723802423589' \
-d 'hotel_hid=704856941555' \
-d 'hotel_result=%E6%88%BF%E5%9E%8B%E5%88%86%E9%94%80%E6%88%90%E5%8A%9F' \
-d 'hotel_rid=222222' \
-d 'luid=luid' \
-d 'name=%E5%B9%BF%E5%B7%9E%E6%97%B6%E4%BB%A3%E7%BE%8E%E6%9C%AF%E9%A6%86%E7%AE%80%E7%BA%A6%E5%85%AC%E5%AF%93' \
-d 'result=%E5%88%86%E9%94%80%E6%88%90%E5%8A%9F' \
-d 'shid=81909014' \
-d 'utime=2024%2F11%2F19+15%3A05' \
-d 'xiaozhu_hid=11111111'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelBnbhotelDataSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.bnb_name="简约复式双床房"
req.distributed_id="376723802423589"
req.bnb_rid="2839624385555"
req.shid="81909014"
req.utime="2024/11/19 15:05"
req.hotel_hid="704856941555"
req.result="分销成功"
req.luid="luid"
req.name="广州时代美术馆简约公寓"
req.xiaozhu_hid="11111111"
req.hotel_rid="222222"
req.ctime="2024-12-23 00:00:00"
req.bnb_hid="234234"
req.hotel_result="房型分销成功"
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.bnbhotel.data.sync");
add_param(pRequest,"bnb_name","简约复式双床房");
add_param(pRequest,"distributed_id","376723802423589");
add_param(pRequest,"bnb_rid","2839624385555");
add_param(pRequest,"shid","81909014");
add_param(pRequest,"utime","2024/11/19 15:05");
add_param(pRequest,"hotel_hid","704856941555");
add_param(pRequest,"result","分销成功");
add_param(pRequest,"luid","luid");
add_param(pRequest,"name","广州时代美术馆简约公寓");
add_param(pRequest,"xiaozhu_hid","11111111");
add_param(pRequest,"hotel_rid","222222");
add_param(pRequest,"ctime","2024-12-23 00:00:00");
add_param(pRequest,"bnb_hid","234234");
add_param(pRequest,"hotel_result","房型分销成功");
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.bnbhotel.data.sync', {
'bnb_name':'简约复式双床房',
'distributed_id':'376723802423589',
'bnb_rid':'2839624385555',
'shid':'81909014',
'utime':'2024/11/19 15:05',
'hotel_hid':'704856941555',
'result':'分销成功',
'luid':'luid',
'name':'广州时代美术馆简约公寓',
'xiaozhu_hid':'11111111',
'hotel_rid':'222222',
'ctime':'2024-12-23 00:00:00',
'bnb_hid':'234234',
'hotel_result':'房型分销成功'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})