TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgReportsQueryStatRequest req = new TbkDgReportsQueryStatRequest();
req.setPageSize(100L);
req.setPageNo(1L);
req.setDimensions("ds");
req.setFilters("ds=20191017;hasCount=true");
req.setReturnFields("ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt");
req.setReportTypeId("union_channel_content_3rd_v1");
TbkDgReportsQueryStatResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkDgReportsQueryStatRequest req = new TbkDgReportsQueryStatRequest();
req.PageSize = 100L;
req.PageNo = 1L;
req.Dimensions = "ds";
req.Filters = "ds=20191017;hasCount=true";
req.ReturnFields = "ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt";
req.ReportTypeId = "union_channel_content_3rd_v1";
TbkDgReportsQueryStatResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkDgReportsQueryStatRequest;
$req->setPageSize("100");
$req->setPageNo("1");
$req->setDimensions("ds");
$req->setFilters("ds=20191017;hasCount=true");
$req->setReturnFields("ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt");
$req->setReportTypeId("union_channel_content_3rd_v1");
$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=taobao.tbk.dg.reports.query.stat' \
-d 'partner_id=apidoc' \
-d 'sign=C14CD53ACEE221CA4069C7FED1AC77CE' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+01%3A07%3A39' \
-d 'v=2.0' \
-d 'dimensions=ds' \
-d 'filters=ds%3D20191017%3BhasCount%3Dtrue' \
-d 'page_no=1' \
-d 'page_size=100' \
-d 'report_type_id=union_channel_content_3rd_v1' \
-d 'return_fields=ds%2Ccm_3rd_pub_share_fee%2Ccm_pub_share_fee%2Cpre_3rd_pub_share_fee%2Cpre_pub_share_fee%2Calipay_amt%2Calipay_num%2Cunion_pv%2Csub_adzone_id%2Csub_site_id%2Csub_pub_id%2Cname%2Cpub_id%2Cunion_uv%2Cred_envelope_gmt%2Cred_envelope_num%2Cactivity_promotion_gmt'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkDgReportsQueryStatRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.page_size=100
req.page_no=1
req.dimensions="ds"
req.filters="ds=20191017;hasCount=true"
req.return_fields="ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt"
req.report_type_id="union_channel_content_3rd_v1"
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,"taobao.tbk.dg.reports.query.stat");
add_param(pRequest,"page_size","100");
add_param(pRequest,"page_no","1");
add_param(pRequest,"dimensions","ds");
add_param(pRequest,"filters","ds=20191017;hasCount=true");
add_param(pRequest,"return_fields","ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt");
add_param(pRequest,"report_type_id","union_channel_content_3rd_v1");
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('taobao.tbk.dg.reports.query.stat', {
'page_size':'100',
'page_no':'1',
'dimensions':'ds',
'filters':'ds=20191017;hasCount=true',
'return_fields':'ds,cm_3rd_pub_share_fee,cm_pub_share_fee,pre_3rd_pub_share_fee,pre_pub_share_fee,alipay_amt,alipay_num,union_pv,sub_adzone_id,sub_site_id,sub_pub_id,name,pub_id,union_uv,red_envelope_gmt,red_envelope_num,activity_promotion_gmt',
'report_type_id':'union_channel_content_3rd_v1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})