TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelTradesSearchRequest req = new AlitripTravelTradesSearchRequest();
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.setItemId(623679350863L);
AlitripTravelTradesSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelTradesSearchRequest req = new AlitripTravelTradesSearchRequest();
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.ItemId = 623679350863L;
AlitripTravelTradesSearchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelTradesSearchRequest;
$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->setItemId("623679350863");
$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.trades.search' \
-d 'partner_id=apidoc' \
-d 'session=133e129a-760f-4bfd-b533-02e6dcc27f77' \
-d 'sign=7C6A2374433B6CA1AC4372F93C80D5AE' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+16%3A29%3A28' \
-d 'v=2.0' \
-d 'category=1' \
-d 'current_page=1' \
-d 'end_created_time=2017-01-01+12%3A00%3A00' \
-d 'item_id=623679350863' \
-d 'order_status=1' \
-d 'page_size=20' \
-d 'start_created_time=2017-01-01+00%3A00%3A00'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelTradesSearchRequest(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.item_id=623679350863
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.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,"item_id","623679350863");
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.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',
'item_id':'623679350863'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})