TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripHotelDistributionSearchLowPriceRequest req = new AlitripBtripHotelDistributionSearchLowPriceRequest();
AlitripBtripHotelDistributionSearchLowPriceRequest.HotelSearchListRq obj1 = new AlitripBtripHotelDistributionSearchLowPriceRequest.HotelSearchListRq();
obj1.setCheckIn("2021-06-05");
obj1.setCheckOut("2021-06-06");
obj1.setCityCode("330100");
obj1.setCityName("杭州");
obj1.setSubChannel("distribution_hkfghnmiujhgv01");
obj1.setOrder(0L);
obj1.setDir(0L);
obj1.setShids("10024010,59947001,60385002");
obj1.setPageNo(1L);
obj1.setPageSize(20L);
req.setParamHotelSearchListRQ(obj1);
AlitripBtripHotelDistributionSearchLowPriceResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripHotelDistributionSearchLowPriceRequest req = new AlitripBtripHotelDistributionSearchLowPriceRequest();
AlitripBtripHotelDistributionSearchLowPriceRequest.HotelSearchListRqDomain obj1 = new AlitripBtripHotelDistributionSearchLowPriceRequest.HotelSearchListRqDomain();
obj1.CheckIn = "2021-06-05";
obj1.CheckOut = "2021-06-06";
obj1.CityCode = "330100";
obj1.CityName = "杭州";
obj1.SubChannel = "distribution_hkfghnmiujhgv01";
obj1.Order = 0L;
obj1.Dir = 0L;
obj1.Shids = "10024010,59947001,60385002";
obj1.PageNo = 1L;
obj1.PageSize = 20L;
req.ParamHotelSearchListRQ_ = obj1;
AlitripBtripHotelDistributionSearchLowPriceResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripHotelDistributionSearchLowPriceRequest;
$param_hotel_search_list_r_q = new HotelSearchListRq;
$param_hotel_search_list_r_q->check_in="2021-06-05";
$param_hotel_search_list_r_q->check_out="2021-06-06";
$param_hotel_search_list_r_q->city_code="330100";
$param_hotel_search_list_r_q->city_name="杭州";
$param_hotel_search_list_r_q->sub_channel="distribution_hkfghnmiujhgv01";
$param_hotel_search_list_r_q->order="0";
$param_hotel_search_list_r_q->dir="0";
$param_hotel_search_list_r_q->shids="10024010,59947001,60385002";
$param_hotel_search_list_r_q->page_no="1";
$param_hotel_search_list_r_q->page_size="20";
$req->setParamHotelSearchListRQ(json_encode($param_hotel_search_list_r_q));
$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=alitrip.btrip.hotel.distribution.search.low.price' \
-d 'partner_id=apidoc' \
-d 'sign=C0C2946F43F5334DB3961C82F7A8B5AB' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+01%3A08%3A22' \
-d 'v=2.0' \
-d 'param_hotel_search_list_r_q=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripHotelDistributionSearchLowPriceRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_hotel_search_list_r_q=""
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,"alitrip.btrip.hotel.distribution.search.low.price");
add_param(pRequest,"param_hotel_search_list_r_q","数据结构JSON示例");
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('alitrip.btrip.hotel.distribution.search.low.price', {
'param_hotel_search_list_r_q':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})