TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTicketScenicBindRequest req = new AlitripTicketScenicBindRequest();
req.setAliScenicId(24498L);
req.setCity("杭州");
req.setAddress("西湖区");
req.setOutScenicName("西湖");
req.setProvince("浙江");
req.setOutScenicId("1111");
req.setUpdateOutScenicId("2222");
AlitripTicketScenicBindResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTicketScenicBindRequest req = new AlitripTicketScenicBindRequest();
req.AliScenicId = 24498L;
req.City = "杭州";
req.Address = "西湖区";
req.OutScenicName = "西湖";
req.Province = "浙江";
req.OutScenicId = "1111";
req.UpdateOutScenicId = "2222";
AlitripTicketScenicBindResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTicketScenicBindRequest;
$req->setAliScenicId("24498");
$req->setCity("杭州");
$req->setAddress("西湖区");
$req->setOutScenicName("西湖");
$req->setProvince("浙江");
$req->setOutScenicId("1111");
$req->setUpdateOutScenicId("2222");
$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.ticket.scenic.bind' \
-d 'partner_id=apidoc' \
-d 'session=f36f5792-e2c3-4b64-8bf6-90737f44bb6a' \
-d 'sign=E9C3AB43ECF46CFFD556BCB666D65A5E' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-24+05%3A13%3A11' \
-d 'v=2.0' \
-d 'address=%E8%A5%BF%E6%B9%96%E5%8C%BA' \
-d 'ali_scenic_id=24498' \
-d 'city=%E6%9D%AD%E5%B7%9E' \
-d 'out_scenic_id=1111' \
-d 'out_scenic_name=%E8%A5%BF%E6%B9%96' \
-d 'province=%E6%B5%99%E6%B1%9F' \
-d 'update_out_scenic_id=2222'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTicketScenicBindRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.ali_scenic_id=24498
req.city="杭州"
req.address="西湖区"
req.out_scenic_name="西湖"
req.province="浙江"
req.out_scenic_id="1111"
req.update_out_scenic_id="2222"
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.ticket.scenic.bind");
add_param(pRequest,"ali_scenic_id","24498");
add_param(pRequest,"city","杭州");
add_param(pRequest,"address","西湖区");
add_param(pRequest,"out_scenic_name","西湖");
add_param(pRequest,"province","浙江");
add_param(pRequest,"out_scenic_id","1111");
add_param(pRequest,"update_out_scenic_id","2222");
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.ticket.scenic.bind', {
'ali_scenic_id':'24498',
'city':'杭州',
'address':'西湖区',
'out_scenic_name':'西湖',
'province':'浙江',
'out_scenic_id':'1111',
'update_out_scenic_id':'2222'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})