TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelAxinHotelMatchRequest req = new AlitripTravelAxinHotelMatchRequest();
AlitripTravelAxinHotelMatchRequest.MatchedHotelRequestDTO obj1 = new AlitripTravelAxinHotelMatchRequest.MatchedHotelRequestDTO();
List<AlitripTravelAxinHotelMatchRequest.HotelMatchDTO> list3 = new ArrayList<AlitripTravelAxinHotelMatchRequest.HotelMatchDTO>();
AlitripTravelAxinHotelMatchRequest.HotelMatchDTO obj4 = new AlitripTravelAxinHotelMatchRequest.HotelMatchDTO();
list3.add(obj4);
obj4.setAddress("杭州文三");
obj4.setHotelEnName("test hotel");
obj4.setLatitude("1234");
obj4.setHotelName("测试酒店");
obj4.setAddressEn("hang zhou road");
obj4.setLongitude("2343");
obj4.setTel("13443434");
obj1.setHotelMatchDTOList(list3);
obj1.setDistributorTid(234234L);
req.setReq(obj1);
AlitripTravelAxinHotelMatchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelAxinHotelMatchRequest req = new AlitripTravelAxinHotelMatchRequest();
AlitripTravelAxinHotelMatchRequest.MatchedHotelRequestDTODomain obj1 = new AlitripTravelAxinHotelMatchRequest.MatchedHotelRequestDTODomain();
List<AlitripTravelAxinHotelMatchRequest.HotelMatchDTODomain> list3 = new List<AlitripTravelAxinHotelMatchRequest.HotelMatchDTODomain>();
AlitripTravelAxinHotelMatchRequest.HotelMatchDTODomain obj4 = new AlitripTravelAxinHotelMatchRequest.HotelMatchDTODomain();
list3.Add(obj4);
obj4.Address = "杭州文三";
obj4.HotelEnName = "test hotel";
obj4.Latitude = "1234";
obj4.HotelName = "测试酒店";
obj4.AddressEn = "hang zhou road";
obj4.Longitude = "2343";
obj4.Tel = "13443434";
obj1.HotelMatchDTOList= list3;
obj1.DistributorTid = 234234L;
req.Req_ = obj1;
AlitripTravelAxinHotelMatchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelAxinHotelMatchRequest;
$req = new MatchedHotelRequestDTO;
$hotel_match_d_t_o_list = new HotelMatchDTO;
$hotel_match_d_t_o_list->address="杭州文三";
$hotel_match_d_t_o_list->hotel_en_name="test hotel";
$hotel_match_d_t_o_list->latitude="1234";
$hotel_match_d_t_o_list->hotel_name="测试酒店";
$hotel_match_d_t_o_list->address_en="hang zhou road";
$hotel_match_d_t_o_list->longitude="2343";
$hotel_match_d_t_o_list->tel="13443434";
$req->setHotelMatchDTOList(json_encode($hotel_match_d_t_o_list));
$req->distributor_tid="234234";
$req->setReq(json_encode($req));
$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.alitrip.travel.axin.hotel.match' \
-d 'partner_id=apidoc' \
-d 'session=be803c0e-c3e9-48e4-a6ab-3b5f0b91ed18' \
-d 'sign=A290B83AEBE979AF2AAC408F18CCBF49' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-18+22%3A34%3A32' \
-d 'v=2.0' \
-d 'req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelAxinHotelMatchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.req="数据结构示例JSON格式"
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.alitrip.travel.axin.hotel.match");
add_param(pRequest,"req","数据结构JSON示例");
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.alitrip.travel.axin.hotel.match', {
'req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})