TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCharityUseractionSyncRequest req = new AlibabaCharityUseractionSyncRequest();
AlibabaCharityUseractionSyncRequest.ChannelUserActionDto obj1 = new AlibabaCharityUseractionSyncRequest.ChannelUserActionDto();
obj1.setActivityId(12345L);
obj1.setEventId("UNI_9901");
obj1.setTbUserId(12345L);
obj1.setTimestampLong(12345L);
obj1.setCharityTypeSubCode("SUB_CODE");
obj1.setForeRegActivity(false);
obj1.setFeaturesMap("{}");
obj1.setFeeling("公益感言");
obj1.setCharityTimestamp(StringUtils.parseDateTime("2019-08-08 12:00:00"));
obj1.setOriContent("{}");
obj1.setThirdUserKey("123");
obj1.setVersion("2");
req.setChannelUserActionDto(obj1);
AlibabaCharityUseractionSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaCharityUseractionSyncRequest req = new AlibabaCharityUseractionSyncRequest();
AlibabaCharityUseractionSyncRequest.ChannelUserActionDtoDomain obj1 = new AlibabaCharityUseractionSyncRequest.ChannelUserActionDtoDomain();
obj1.ActivityId = 12345L;
obj1.EventId = "UNI_9901";
obj1.TbUserId = 12345L;
obj1.TimestampLong = 12345L;
obj1.CharityTypeSubCode = "SUB_CODE";
obj1.ForeRegActivity = false;
obj1.FeaturesMap = "{}";
obj1.Feeling = "公益感言";
obj1.CharityTimestamp = DateTime.Parse(2019-08-08 12:00:00");
obj1.OriContent = "{}";
obj1.ThirdUserKey = "123";
obj1.Version = "2";
req.ChannelUserActionDto_ = obj1;
AlibabaCharityUseractionSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaCharityUseractionSyncRequest;
$channel_user_action_dto = new ChannelUserActionDto;
$channel_user_action_dto->activity_id="12345";
$channel_user_action_dto->event_id="UNI_9901";
$channel_user_action_dto->tb_user_id="12345";
$channel_user_action_dto->timestamp_long="12345";
$channel_user_action_dto->charity_type_sub_code="SUB_CODE";
$channel_user_action_dto->fore_reg_activity="false";
$channel_user_action_dto->features_map="{}";
$channel_user_action_dto->feeling="公益感言";
$channel_user_action_dto->charity_timestamp="2019-08-08 12:00:00";
$channel_user_action_dto->ori_content="{}";
$channel_user_action_dto->third_user_key="123";
$channel_user_action_dto->version="2";
$req->setChannelUserActionDto(json_encode($channel_user_action_dto));
$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.charity.useraction.sync' \
-d 'partner_id=apidoc' \
-d 'sign=8361961F915ABA35012905468000E091' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-12+02%3A58%3A22' \
-d 'v=2.0' \
-d 'channel_user_action_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaCharityUseractionSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.channel_user_action_dto=""
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.charity.useraction.sync");
add_param(pRequest,"channel_user_action_dto","数据结构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.charity.useraction.sync', {
'channel_user_action_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})