TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelItemShelveRequest req = new AlitripTravelItemShelveRequest();
req.setItemId(123456L);
req.setItemStatus(1L);
req.setOnlineTime(StringUtils.parseDateTime("2015-10-10 10:10:10"));
req.setOutProductId("111");
AlitripTravelItemShelveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelItemShelveRequest req = new AlitripTravelItemShelveRequest();
req.ItemId = 123456L;
req.ItemStatus = 1L;
req.OnlineTime = DateTime.Parse("2015-10-10 10:10:10");
req.OutProductId = "111";
AlitripTravelItemShelveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelItemShelveRequest;
$req->setItemId("123456");
$req->setItemStatus("1");
$req->setOnlineTime("2015-10-10 10:10:10");
$req->setOutProductId("111");
$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.travel.item.shelve' \
-d 'partner_id=apidoc' \
-d 'session=3f037c79-376b-47cd-8b10-283e3c93df63' \
-d 'sign=BB74BBA44ECE2295427184E22239FD9F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A33%3A25' \
-d 'v=2.0' \
-d 'item_id=123456' \
-d 'item_status=1' \
-d 'online_time=2015-10-10+10%3A10%3A10' \
-d 'out_product_id=111'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelItemShelveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_id=123456
req.item_status=1
req.online_time="2015-10-10 10:10:10"
req.out_product_id="111"
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.travel.item.shelve");
add_param(pRequest,"item_id","123456");
add_param(pRequest,"item_status","1");
add_param(pRequest,"online_time","2015-10-10 10:10:10");
add_param(pRequest,"out_product_id","111");
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.travel.item.shelve', {
'item_id':'123456',
'item_status':'1',
'online_time':'2015-10-10 10:10:10',
'out_product_id':'111'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})