TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentOrderListRequest req = new TrainAgentOrderListRequest();
TrainAgentOrderListRequest.QueryOrderListRQ obj1 = new TrainAgentOrderListRequest.QueryOrderListRQ();
obj1.setFromStationName("北京");
obj1.setToStationName("上海");
obj1.setTrainDate("20231212");
obj1.setTrainNo("Z121");
obj1.setSeatTypeCode("1");
req.setParam(obj1);
TrainAgentOrderListResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentOrderListRequest req = new TrainAgentOrderListRequest();
TrainAgentOrderListRequest.QueryOrderListRQDomain obj1 = new TrainAgentOrderListRequest.QueryOrderListRQDomain();
obj1.FromStationName = "北京";
obj1.ToStationName = "上海";
obj1.TrainDate = "20231212";
obj1.TrainNo = "Z121";
obj1.SeatTypeCode = "1";
req.Param_ = obj1;
TrainAgentOrderListResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentOrderListRequest;
$param = new QueryOrderListRQ;
$param->from_station_name="北京";
$param->to_station_name="上海";
$param->train_date="20231212";
$param->train_no="Z121";
$param->seat_type_code="1";
$req->setParam(json_encode($param));
$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.train.agent.order.list' \
-d 'partner_id=apidoc' \
-d 'session=128e514f-677f-48ac-8004-d2621f4adc37' \
-d 'sign=2A29D092A9C256FF6238D044CAFBDFEA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+16%3A41%3A46' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentOrderListRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param="数据结构示例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.train.agent.order.list");
add_param(pRequest,"param","数据结构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.train.agent.order.list', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})