TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallApplestoreBookingCountingSetupRequest req = new TmallApplestoreBookingCountingSetupRequest();
TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupBatchCmd obj1 = new TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupBatchCmd();
List<TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmd> list3 = new ArrayList<TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmd>();
TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmd obj4 = new TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmd();
list3.add(obj4);
obj4.setBookingEnd(1702284931000L);
obj4.setScItemId("34567890");
obj4.setBookingFrom(1702274931000L);
obj1.setCmdList(list3);
req.setRealtimeBookingSetupBatchCmd(obj1);
TmallApplestoreBookingCountingSetupResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallApplestoreBookingCountingSetupRequest req = new TmallApplestoreBookingCountingSetupRequest();
TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupBatchCmdDomain obj1 = new TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupBatchCmdDomain();
List<TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmdDomain> list3 = new List<TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmdDomain>();
TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmdDomain obj4 = new TmallApplestoreBookingCountingSetupRequest.RealtimeBookingSetupCmdDomain();
list3.Add(obj4);
obj4.BookingEnd = 1702284931000L;
obj4.ScItemId = "34567890";
obj4.BookingFrom = 1702274931000L;
obj1.CmdList= list3;
req.RealtimeBookingSetupBatchCmd_ = obj1;
TmallApplestoreBookingCountingSetupResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallApplestoreBookingCountingSetupRequest;
$realtime_booking_setup_batch_cmd = new RealtimeBookingSetupBatchCmd;
$cmd_list = new RealtimeBookingSetupCmd;
$cmd_list->booking_end="1702284931000";
$cmd_list->sc_item_id="34567890";
$cmd_list->booking_from="1702274931000";
$realtime_booking_setup_batch_cmd->cmd_list = $cmd_list;
$req->setRealtimeBookingSetupBatchCmd(json_encode($realtime_booking_setup_batch_cmd));
$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=tmall.applestore.booking.counting.setup' \
-d 'partner_id=apidoc' \
-d 'session=75d0cf10-7fcb-4481-a3d0-bd89e1887bde' \
-d 'sign=328DF562C21B4AC81543B0CA031B05FD' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-04+16%3A47%3A09' \
-d 'v=2.0' \
-d 'realtime_booking_setup_batch_cmd=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallApplestoreBookingCountingSetupRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.realtime_booking_setup_batch_cmd="数据结构示例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,"tmall.applestore.booking.counting.setup");
add_param(pRequest,"realtime_booking_setup_batch_cmd","数据结构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('tmall.applestore.booking.counting.setup', {
'realtime_booking_setup_batch_cmd':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})