TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripItPolicyBatchdeleteRequest req = new AlitripItPolicyBatchdeleteRequest();
req.setAirline("CA");
req.setArrCity("WUH");
req.setCabin("Y");
req.setDepCity("SHA");
req.setPolicyId("123");
req.setStatusList("0,2");
AlitripItPolicyBatchdeleteResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripItPolicyBatchdeleteRequest req = new AlitripItPolicyBatchdeleteRequest();
req.Airline = "CA";
req.ArrCity = "WUH";
req.Cabin = "Y";
req.DepCity = "SHA";
req.PolicyId = "123";
req.StatusList = "0,2";
AlitripItPolicyBatchdeleteResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripItPolicyBatchdeleteRequest;
$req->setAirline("CA");
$req->setArrCity("WUH");
$req->setCabin("Y");
$req->setDepCity("SHA");
$req->setPolicyId("123");
$req->setStatusList("0,2");
$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.it.policy.batchdelete' \
-d 'partner_id=apidoc' \
-d 'session=e76b01fc-f75d-41ed-a765-8af542df7766' \
-d 'sign=2456C13F3EB033072F46C6000DDDD196' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+16%3A21%3A27' \
-d 'v=2.0' \
-d 'airline=CA' \
-d 'arr_city=WUH' \
-d 'cabin=Y' \
-d 'dep_city=SHA' \
-d 'policy_id=123' \
-d 'status_list=0%2C2'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripItPolicyBatchdeleteRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.airline="CA"
req.arr_city="WUH"
req.cabin="Y"
req.dep_city="SHA"
req.policy_id="123"
req.status_list="0,2"
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.it.policy.batchdelete");
add_param(pRequest,"airline","CA");
add_param(pRequest,"arr_city","WUH");
add_param(pRequest,"cabin","Y");
add_param(pRequest,"dep_city","SHA");
add_param(pRequest,"policy_id","123");
add_param(pRequest,"status_list","0,2");
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.it.policy.batchdelete', {
'airline':'CA',
'arr_city':'WUH',
'cabin':'Y',
'dep_city':'SHA',
'policy_id':'123',
'status_list':'0,2'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})