TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkDgMediaMonthReportRequest req = new TbkDgMediaMonthReportRequest();
req.setPageSize(20L);
req.setPageNo(1L);
req.setDimensions("ds");
req.setFilters("div_rule=1;ds=201903");
req.setReturnFields("total_alipay_amt,pub_id,div_rule,settle_amount");
req.setReportTypeId("union_media_month_report");
TbkDgMediaMonthReportResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkDgMediaMonthReportRequest req = new TbkDgMediaMonthReportRequest();
req.PageSize = 20L;
req.PageNo = 1L;
req.Dimensions = "ds";
req.Filters = "div_rule=1;ds=201903";
req.ReturnFields = "total_alipay_amt,pub_id,div_rule,settle_amount";
req.ReportTypeId = "union_media_month_report";
TbkDgMediaMonthReportResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkDgMediaMonthReportRequest;
$req->setPageSize("20");
$req->setPageNo("1");
$req->setDimensions("ds");
$req->setFilters("div_rule=1;ds=201903");
$req->setReturnFields("total_alipay_amt,pub_id,div_rule,settle_amount");
$req->setReportTypeId("union_media_month_report");
$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.media.month.report' \
-d 'partner_id=apidoc' \
-d 'sign=A68EBCAD10266EBF9D3FD54965DD4E40' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A48%3A54' \
-d 'v=2.0' \
-d 'dimensions=ds' \
-d 'filters=div_rule%3D1%3Bds%3D201903' \
-d 'page_no=1' \
-d 'page_size=20' \
-d 'report_type_id=union_media_month_report' \
-d 'return_fields=total_alipay_amt%2Cpub_id%2Cdiv_rule%2Csettle_amount'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkDgMediaMonthReportRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.page_size=20
req.page_no=1
req.dimensions="ds"
req.filters="div_rule=1;ds=201903"
req.return_fields="total_alipay_amt,pub_id,div_rule,settle_amount"
req.report_type_id="union_media_month_report"
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.media.month.report");
add_param(pRequest,"page_size","20");
add_param(pRequest,"page_no","1");
add_param(pRequest,"dimensions","ds");
add_param(pRequest,"filters","div_rule=1;ds=201903");
add_param(pRequest,"return_fields","total_alipay_amt,pub_id,div_rule,settle_amount");
add_param(pRequest,"report_type_id","union_media_month_report");
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.media.month.report', {
'page_size':'20',
'page_no':'1',
'dimensions':'ds',
'filters':'div_rule=1;ds=201903',
'return_fields':'total_alipay_amt,pub_id,div_rule,settle_amount',
'report_type_id':'union_media_month_report'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})