TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbreviewReplyRequest req = new XhotelBnbreviewReplyRequest();
req.setOuterId(1L);
req.setContent("不错");
req.setWrateType(1L);
req.setWrateId(100L);
req.setItemWrateId(1000L);
req.setItemId(1212L);
XhotelBnbreviewReplyRequest.MediaInfo obj1 = new XhotelBnbreviewReplyRequest.MediaInfo();
obj1.setType(1L);
obj1.setUrls(""http://xxx.jps"");
req.setMediaInfo(obj1);
XhotelBnbreviewReplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelBnbreviewReplyRequest req = new XhotelBnbreviewReplyRequest();
req.OuterId = 1L;
req.Content = "不错";
req.WrateType = 1L;
req.WrateId = 100L;
req.ItemWrateId = 1000L;
req.ItemId = 1212L;
XhotelBnbreviewReplyRequest.MediaInfoDomain obj1 = new XhotelBnbreviewReplyRequest.MediaInfoDomain();
obj1.Type = 1L;
obj1.Urls = ""http://xxx.jps"";
req.MediaInfo_ = obj1;
XhotelBnbreviewReplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelBnbreviewReplyRequest;
$req->setOuterId("1");
$req->setContent("不错");
$req->setWrateType("1");
$req->setWrateId("100");
$req->setItemWrateId("1000");
$req->setItemId("1212");
$media_info = new MediaInfo;
$media_info->type="1";
$media_info->urls="[\"http://xxx.jps\"]";
$req->setMediaInfo(json_encode($media_info));
$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.bnbreview.reply' \
-d 'partner_id=apidoc' \
-d 'session=9e617125-794c-45b2-8307-7b12a3eee051' \
-d 'sign=139B758D8BABB12B9EBDCB052CB14D90' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+21%3A06%3A18' \
-d 'v=2.0' \
-d 'content=%E4%B8%8D%E9%94%99' \
-d 'item_id=1212' \
-d 'item_wrate_id=1000' \
-d 'media_info=null' \
-d 'outer_id=1' \
-d 'wrate_id=100' \
-d 'wrate_type=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelBnbreviewReplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.outer_id=1
req.content="不错"
req.wrate_type=1
req.wrate_id=100
req.item_wrate_id=1000
req.item_id=1212
req.media_info="数据结构示例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.xhotel.bnbreview.reply");
add_param(pRequest,"outer_id","1");
add_param(pRequest,"content","不错");
add_param(pRequest,"wrate_type","1");
add_param(pRequest,"wrate_id","100");
add_param(pRequest,"item_wrate_id","1000");
add_param(pRequest,"item_id","1212");
add_param(pRequest,"media_info","数据结构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.bnbreview.reply', {
'outer_id':'1',
'content':'不错',
'wrate_type':'1',
'wrate_id':'100',
'item_wrate_id':'1000',
'item_id':'1212',
'media_info':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})