TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkMarketingItemdiscountQueryactivityRequest req = new AlibabaWdkMarketingItemdiscountQueryactivityRequest();
AlibabaWdkMarketingItemdiscountQueryactivityRequest.CommonActivityParam obj1 = new AlibabaWdkMarketingItemdiscountQueryactivityRequest.CommonActivityParam();
obj1.setActivityId(123456L);
obj1.setOutActId("sanjiang170907");
obj1.setByChannel(true);
List<AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfig> list3 = new ArrayList<AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfig>();
AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfig obj4 = new AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfig();
list3.add(obj4);
obj4.setChannel("31");
obj1.setChannelConfigList(list3);
req.setParam0(obj1);
AlibabaWdkMarketingItemdiscountQueryactivityResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaWdkMarketingItemdiscountQueryactivityRequest req = new AlibabaWdkMarketingItemdiscountQueryactivityRequest();
AlibabaWdkMarketingItemdiscountQueryactivityRequest.CommonActivityParamDomain obj1 = new AlibabaWdkMarketingItemdiscountQueryactivityRequest.CommonActivityParamDomain();
obj1.ActivityId = 123456L;
obj1.OutActId = "sanjiang170907";
obj1.ByChannel = true;
List<AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfigDomain> list3 = new List<AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfigDomain>();
AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfigDomain obj4 = new AlibabaWdkMarketingItemdiscountQueryactivityRequest.ChannelConfigDomain();
list3.Add(obj4);
obj4.Channel = "31";
obj1.ChannelConfigList= list3;
req.Param0_ = obj1;
AlibabaWdkMarketingItemdiscountQueryactivityResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaWdkMarketingItemdiscountQueryactivityRequest;
$param0 = new CommonActivityParam;
$param0->activity_id="123456";
$param0->out_act_id="sanjiang170907";
$param0->by_channel="true";
$channel_config_list = new ChannelConfig;
$channel_config_list->channel="31";
$param0->channel_config_list = $channel_config_list;
$req->setParam0(json_encode($param0));
$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=alibaba.wdk.marketing.itemdiscount.queryactivity' \
-d 'partner_id=apidoc' \
-d 'session=ce1f14b7-b05a-4cd0-adf5-f96211b545dc' \
-d 'sign=E71128D312E4933ABDE8814FAE8EEC7D' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+18%3A59%3A49' \
-d 'v=2.0' \
-d 'param0=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaWdkMarketingItemdiscountQueryactivityRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param0=""
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,"alibaba.wdk.marketing.itemdiscount.queryactivity");
add_param(pRequest,"param0","数据结构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('alibaba.wdk.marketing.itemdiscount.queryactivity', {
'param0':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})