TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbstatusxbotSendRequest req = new XhotelBnbstatusxbotSendRequest();
req.setPatterns("您好");
req.setPhoneNum("1423338388");
req.setRequestId("faerffdaafda");
req.setScene("confirm_room_status");
XhotelBnbstatusxbotSendResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelBnbstatusxbotSendRequest req = new XhotelBnbstatusxbotSendRequest();
req.Patterns = "您好";
req.PhoneNum = "1423338388";
req.RequestId = "faerffdaafda";
req.Scene = "confirm_room_status";
XhotelBnbstatusxbotSendResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelBnbstatusxbotSendRequest;
$req->setPatterns("您好");
$req->setPhoneNum("1423338388");
$req->setRequestId("faerffdaafda");
$req->setScene("confirm_room_status");
$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.bnbstatusxbot.send' \
-d 'partner_id=apidoc' \
-d 'session=39ec2117-1fc8-488e-9e45-83315b775522' \
-d 'sign=5FBD57F6D2BB158456F8F8DEBADF54DA' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-03+07%3A56%3A59' \
-d 'v=2.0' \
-d 'patterns=%E6%82%A8%E5%A5%BD' \
-d 'phone_num=1423338388' \
-d 'request_id=faerffdaafda' \
-d 'scene=confirm_room_status'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelBnbstatusxbotSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.patterns="您好"
req.phone_num="1423338388"
req.request_id="faerffdaafda"
req.scene="confirm_room_status"
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.bnbstatusxbot.send");
add_param(pRequest,"patterns","您好");
add_param(pRequest,"phone_num","1423338388");
add_param(pRequest,"request_id","faerffdaafda");
add_param(pRequest,"scene","confirm_room_status");
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.bnbstatusxbot.send', {
'patterns':'您好',
'phone_num':'1423338388',
'request_id':'faerffdaafda',
'scene':'confirm_room_status'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})