TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripFuturehotelContentIntentionAddRequest req = new AlitripFuturehotelContentIntentionAddRequest();
AlitripFuturehotelContentIntentionAddRequest.InsertIntentionReq obj1 = new AlitripFuturehotelContentIntentionAddRequest.InsertIntentionReq();
obj1.setCityCode(530900L);
obj1.setCityName("临沧市");
obj1.setContactName("测试");
obj1.setContactNumber("15556789827");
obj1.setDistrictCode(530902L);
obj1.setDistrictName("临翔区");
obj1.setHotelName("菲住");
obj1.setId(2L);
obj1.setLoginUserId("1");
obj1.setProvinceCode(530000L);
obj1.setProvinceName("云南省");
obj1.setType(1L);
req.setParamInsertIntentionReq(obj1);
AlitripFuturehotelContentIntentionAddResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripFuturehotelContentIntentionAddRequest req = new AlitripFuturehotelContentIntentionAddRequest();
AlitripFuturehotelContentIntentionAddRequest.InsertIntentionReqDomain obj1 = new AlitripFuturehotelContentIntentionAddRequest.InsertIntentionReqDomain();
obj1.CityCode = 530900L;
obj1.CityName = "临沧市";
obj1.ContactName = "测试";
obj1.ContactNumber = "15556789827";
obj1.DistrictCode = 530902L;
obj1.DistrictName = "临翔区";
obj1.HotelName = "菲住";
obj1.Id = 2L;
obj1.LoginUserId = "1";
obj1.ProvinceCode = 530000L;
obj1.ProvinceName = "云南省";
obj1.Type = 1L;
req.ParamInsertIntentionReq_ = obj1;
AlitripFuturehotelContentIntentionAddResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripFuturehotelContentIntentionAddRequest;
$param_insert_intention_req = new InsertIntentionReq;
$param_insert_intention_req->city_code="530900";
$param_insert_intention_req->city_name="临沧市";
$param_insert_intention_req->contact_name="测试";
$param_insert_intention_req->contact_number="15556789827";
$param_insert_intention_req->district_code="530902";
$param_insert_intention_req->district_name="临翔区";
$param_insert_intention_req->hotel_name="菲住";
$param_insert_intention_req->id="2";
$param_insert_intention_req->login_user_id="1";
$param_insert_intention_req->province_code="530000";
$param_insert_intention_req->province_name="云南省";
$param_insert_intention_req->type="1";
$req->setParamInsertIntentionReq(json_encode($param_insert_intention_req));
$resp = $c->execute($req);
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.futurehotel.content.intention.add' \
-d 'partner_id=apidoc' \
-d 'sign=FA86B4E8A4956BCD89E4ED09F74D976D' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-07-06+16%3A47%3A32' \
-d 'v=2.0' \
-d 'param_insert_intention_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripFuturehotelContentIntentionAddRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_insert_intention_req=""
try:
resp= req.getResponse()
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.futurehotel.content.intention.add");
add_param(pRequest,"param_insert_intention_req","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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.futurehotel.content.intention.add', {
'param_insert_intention_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})