TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTmallgenieScpPlanNetdemandUploadRequest req = new AlibabaTmallgenieScpPlanNetdemandUploadRequest();
AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandRequest obj1 = new AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandRequest();
List<AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDto> list3 = new ArrayList<AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDto>();
AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDto obj4 = new AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDto();
list3.add(obj4);
obj4.setExtendJson("{\"a\":\"b\"}");
obj4.setTenant("ailab");
obj4.setKeyFigureDate(StringUtils.parseDateTime("2020-09-09 22:00:00"));
obj4.setNetDemand(22L);
obj4.setLocid("1");
obj4.setPrdid("1");
obj1.setNetDemandDTOs(list3);
obj1.setRequestExtendJson("{\"a\":\"b\"}");
req.setNetDemandRequest(obj1);
AlibabaTmallgenieScpPlanNetdemandUploadResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaTmallgenieScpPlanNetdemandUploadRequest req = new AlibabaTmallgenieScpPlanNetdemandUploadRequest();
AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandRequestDomain obj1 = new AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandRequestDomain();
List<AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDtoDomain> list3 = new List<AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDtoDomain>();
AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDtoDomain obj4 = new AlibabaTmallgenieScpPlanNetdemandUploadRequest.NetDemandDtoDomain();
list3.Add(obj4);
obj4.ExtendJson = "{\"a\":\"b\"}";
obj4.Tenant = "ailab";
obj4.KeyFigureDate = DateTime.Parse(2020-09-09 22:00:00");
obj4.NetDemand = 22L;
obj4.Locid = "1";
obj4.Prdid = "1";
obj1.NetDemandDTOs= list3;
obj1.RequestExtendJson = "{\"a\":\"b\"}";
req.NetDemandRequest_ = obj1;
AlibabaTmallgenieScpPlanNetdemandUploadResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaTmallgenieScpPlanNetdemandUploadRequest;
$net_demand_request = new NetDemandRequest;
$net_demand_d_t_os = new NetDemandDto;
$net_demand_d_t_os->extend_json="{\"a\":\"b\"}";
$net_demand_d_t_os->tenant="ailab";
$net_demand_d_t_os->key_figure_date="2020-09-09 22:00:00";
$net_demand_d_t_os->net_demand="22";
$net_demand_d_t_os->locid="1";
$net_demand_d_t_os->prdid="1";
$net_demand_request->net_demand_d_t_os = $net_demand_d_t_os;
$net_demand_request->request_extend_json="{\"a\":\"b\"}";
$req->setNetDemandRequest(json_encode($net_demand_request));
$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=alibaba.tmallgenie.scp.plan.netdemand.upload' \
-d 'partner_id=apidoc' \
-d 'sign=1857F9C45CB731713C7142632AB99292' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-27+23%3A22%3A42' \
-d 'v=2.0' \
-d 'net_demand_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaTmallgenieScpPlanNetdemandUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.net_demand_request=""
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,"alibaba.tmallgenie.scp.plan.netdemand.upload");
add_param(pRequest,"net_demand_request","数据结构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('alibaba.tmallgenie.scp.plan.netdemand.upload', {
'net_demand_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})