TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelCityCoordinatesBatchUploadRequest req = new XhotelCityCoordinatesBatchUploadRequest();
List<XhotelCityCoordinatesBatchUploadRequest.Coordinate> list2 = new ArrayList<XhotelCityCoordinatesBatchUploadRequest.Coordinate>();
XhotelCityCoordinatesBatchUploadRequest.Coordinate obj3 = new XhotelCityCoordinatesBatchUploadRequest.Coordinate();
list2.add(obj3);
obj3.setCountry(900170L);
obj3.setLatitude("7.880405");
obj3.setLongitude("98.392202");
obj3.setOuterId("8554");
req.setCoordinateList(list2);
XhotelCityCoordinatesBatchUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelCityCoordinatesBatchUploadRequest req = new XhotelCityCoordinatesBatchUploadRequest();
List<XhotelCityCoordinatesBatchUploadRequest.CoordinateDomain> list2 = new List<XhotelCityCoordinatesBatchUploadRequest.CoordinateDomain>();
XhotelCityCoordinatesBatchUploadRequest.CoordinateDomain obj3 = new XhotelCityCoordinatesBatchUploadRequest.CoordinateDomain();
list2.Add(obj3);
obj3.Country = 900170L;
obj3.Latitude = "7.880405";
obj3.Longitude = "98.392202";
obj3.OuterId = "8554";
req.CoordinateList_ = list2;
XhotelCityCoordinatesBatchUploadResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelCityCoordinatesBatchUploadRequest;
$coordinate_list = new Coordinate;
$coordinate_list->country="900170";
$coordinate_list->latitude="7.880405";
$coordinate_list->longitude="98.392202";
$coordinate_list->outer_id="8554";
$req->setCoordinateList(json_encode($coordinate_list));
$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.xhotel.city.coordinates.batch.upload' \
-d 'partner_id=apidoc' \
-d 'session=9c84f073-bd1a-42af-8e1b-aa363a8c62dd' \
-d 'sign=DAC3F7A06D7577CFB39F242AEDDFC3BA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A44%3A02' \
-d 'v=2.0' \
-d 'coordinate_list=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelCityCoordinatesBatchUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.coordinate_list=""
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.xhotel.city.coordinates.batch.upload");
add_param(pRequest,"coordinate_list","数据结构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.xhotel.city.coordinates.batch.upload', {
'coordinate_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})