TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UnideskRtaAssetsProfileAddRequest req = new UnideskRtaAssetsProfileAddRequest();
UnideskRtaAssetsProfileAddRequest.AdvertiserProfileTopDTO obj1 = new UnideskRtaAssetsProfileAddRequest.AdvertiserProfileTopDTO();
obj1.setNickName("name");
obj1.setDescription("description");
obj1.setProfileImgId("1");
obj1.setType(1L);
obj1.setAdvertiserId(1L);
req.setAdvertiserProfileTopDto(obj1);
UnideskRtaAssetsProfileAddResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
UnideskRtaAssetsProfileAddRequest req = new UnideskRtaAssetsProfileAddRequest();
UnideskRtaAssetsProfileAddRequest.AdvertiserProfileTopDTODomain obj1 = new UnideskRtaAssetsProfileAddRequest.AdvertiserProfileTopDTODomain();
obj1.NickName = "name";
obj1.Description = "description";
obj1.ProfileImgId = "1";
obj1.Type = 1L;
obj1.AdvertiserId = 1L;
req.AdvertiserProfileTopDto_ = obj1;
UnideskRtaAssetsProfileAddResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new UnideskRtaAssetsProfileAddRequest;
$advertiser_profile_top_dto = new AdvertiserProfileTopDTO;
$advertiser_profile_top_dto->nick_name="name";
$advertiser_profile_top_dto->description="description";
$advertiser_profile_top_dto->profile_img_id="1";
$advertiser_profile_top_dto->type="1";
$advertiser_profile_top_dto->advertiser_id="1";
$req->setAdvertiserProfileTopDto(json_encode($advertiser_profile_top_dto));
$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=taobao.unidesk.rta.assets.profile.add' \
-d 'partner_id=apidoc' \
-d 'session=0c24bba9-f131-4398-a5ba-a7b45f5f39d7' \
-d 'sign=B85F0AD0B356A6DD5994887B6AA53146' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-30+16%3A50%3A57' \
-d 'v=2.0' \
-d 'advertiser_profile_top_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.UnideskRtaAssetsProfileAddRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.advertiser_profile_top_dto="数据结构示例JSON格式"
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,"taobao.unidesk.rta.assets.profile.add");
add_param(pRequest,"advertiser_profile_top_dto","数据结构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('taobao.unidesk.rta.assets.profile.add', {
'advertiser_profile_top_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})