pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.tbk.feed.indicator.upload");
add_param(pRequest,"event_id","111");
add_param(pRequest,"evoke_pv","11");
add_param(pRequest,"rpt_start_time","2023-02-10 23:59:59");
add_param(pRequest,"creative_name","xxx");
add_param(pRequest,"click_pv","1");
add_param(pRequest,"play_pv","1");
add_param(pRequest,"unit_name","xxx");
add_param(pRequest,"exposure_pv","1");
add_param(pRequest,"account_name","xxx");
add_param(pRequest,"campaign_id","1");
add_param(pRequest,"content_id","xxx");
add_param(pRequest,"sclick_pv","1");
add_param(pRequest,"rpt_end_time","2023-02-10 23:59:59");
add_param(pRequest,"creative_id","1");
add_param(pRequest,"content_name","xxx");
add_param(pRequest,"sclick_exposure_pv","1");
add_param(pRequest,"account_id","1");
add_param(pRequest,"unit_id","1");
add_param(pRequest,"consume_amt","1");
add_param(pRequest,"campaign_name","xxx");
add_param(pRequest,"play_uv","123");
add_param(pRequest,"order_id","123");
add_param(pRequest,"order_name","xxx");
add_param(pRequest,"cpm","123");
add_param(pRequest,"cpc","123");
add_param(pRequest,"cpa","123");
add_param(pRequest,"like_pv","123");
add_param(pRequest,"collect_pv","123");
add_param(pRequest,"comment_pv","123");
add_param(pRequest,"read_rate","123");
add_param(pRequest,"sclick_exposure_rate","123");
add_param(pRequest,"sclick_click_rate","123");
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.feed.indicator.upload', {
'event_id':'111',
'evoke_pv':'11',
'rpt_start_time':'2023-02-10 23:59:59',
'creative_name':'xxx',
'click_pv':'1',
'play_pv':'1',
'unit_name':'xxx',
'exposure_pv':'1',
'account_name':'xxx',
'campaign_id':'1',
'content_id':'xxx',
'sclick_pv':'1',
'rpt_end_time':'2023-02-10 23:59:59',
'creative_id':'1',
'content_name':'xxx',
'sclick_exposure_pv':'1',
'account_id':'1',
'unit_id':'1',
'consume_amt':'1',
'campaign_name':'xxx',
'play_uv':'123',
'order_id':'123',
'order_name':'xxx',
'cpm':'123',
'cpc':'123',
'cpa':'123',
'like_pv':'123',
'collect_pv':'123',
'comment_pv':'123',
'read_rate':'123',
'sclick_exposure_rate':'123',
'sclick_click_rate':'123'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})