TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelTripbuyTradesSearchRequest req = new AlitripTravelTripbuyTradesSearchRequest();
req.setPageSize(20L);
req.setEndCreatedTime(StringUtils.parseDateTime("2017-01-01 12:00:00"));
req.setOrderStatus(1L);
req.setCurrentPage(1L);
req.setStartCreatedTime(StringUtils.parseDateTime("2017-01-01 00:00:00"));
req.setCategory(1L);
req.setTfOrderType(1L);
AlitripTravelTripbuyTradesSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelTripbuyTradesSearchRequest req = new AlitripTravelTripbuyTradesSearchRequest();
req.PageSize = 20L;
req.EndCreatedTime = DateTime.Parse("2017-01-01 12:00:00");
req.OrderStatus = 1L;
req.CurrentPage = 1L;
req.StartCreatedTime = DateTime.Parse("2017-01-01 00:00:00");
req.Category = 1L;
req.TfOrderType = 1L;
AlitripTravelTripbuyTradesSearchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelTripbuyTradesSearchRequest;
$req->setPageSize("20");
$req->setEndCreatedTime("2017-01-01 12:00:00");
$req->setOrderStatus("1");
$req->setCurrentPage("1");
$req->setStartCreatedTime("2017-01-01 00:00:00");
$req->setCategory("1");
$req->setTfOrderType("1");
$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=alitrip.travel.tripbuy.trades.search' \
-d 'partner_id=apidoc' \
-d 'session=e5269031-b429-4c07-817d-8b2a612f9e7f' \
-d 'sign=2117975FF8A67733BF8A4A0EB0320686' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-05+02%3A50%3A10' \
-d 'v=2.0' \
-d 'category=1' \
-d 'current_page=1' \
-d 'end_created_time=2017-01-01+12%3A00%3A00' \
-d 'order_status=1' \
-d 'page_size=20' \
-d 'start_created_time=2017-01-01+00%3A00%3A00' \
-d 'tf_order_type=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelTripbuyTradesSearchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.page_size=20
req.end_created_time="2017-01-01 12:00:00"
req.order_status=1
req.current_page=1
req.start_created_time="2017-01-01 00:00:00"
req.category=1
req.tf_order_type=1
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,"alitrip.travel.tripbuy.trades.search");
add_param(pRequest,"page_size","20");
add_param(pRequest,"end_created_time","2017-01-01 12:00:00");
add_param(pRequest,"order_status","1");
add_param(pRequest,"current_page","1");
add_param(pRequest,"start_created_time","2017-01-01 00:00:00");
add_param(pRequest,"category","1");
add_param(pRequest,"tf_order_type","1");
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('alitrip.travel.tripbuy.trades.search', {
'page_size':'20',
'end_created_time':'2017-01-01 12:00:00',
'order_status':'1',
'current_page':'1',
'start_created_time':'2017-01-01 00:00:00',
'category':'1',
'tf_order_type':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})